Add support for phpdocumentor/reflection-docblock v6#660
Add support for phpdocumentor/reflection-docblock v6#660mspirkov wants to merge 8 commits intophpspec:masterfrom
phpdocumentor/reflection-docblock v6#660Conversation
|
Adding support for it seems to require more work than just changing the composer requirement. |
|
Yes. I see errors. I'll fix them. |
|
We also need this fix: phpspec/phpspec#1503 |
| } catch (CannotCreateTag $e) { | ||
| // In version 6.0, all deprecated methods have been removed from "ReflectionDocblock". | ||
| // Now, exceptions are thrown when trying to create a tag with a type and in other | ||
| // situations that previously did not throw exceptions. |
There was a problem hiding this comment.
this looks suspicious to me. AFAICT, we should not be trying to create tags directly (and if we currently do, we should instead fix the root cause). In which case does this exception happen in a way that should be caught to ignore all tags ?
There was a problem hiding this comment.
It's hard to say, because I don't use this package and I don't fully understand what's going on inside it. I'll take a closer look.
There was a problem hiding this comment.
what was the behavior without adding this catch statement ?
There was a problem hiding this comment.
Tests fail due to exceptions: https://github.com/phpspec/prophecy/actions/runs/21114065815/job/60726462701
There was a problem hiding this comment.
Given that the static create method of the Method tag is not meant to be called anymore (the proper tag factory should be used instead), the actual root cause should be investigated (inspecting the stack trace to see where it is called). It might be an issue in the way we use the library (which then must be fixed) or an upstream bug. But silently ignoring all tags when a CannotCreateTag exception happen while this exception only happens when reaching an unsupported code path does not make sense (and would probably break support for magic methods)
There was a problem hiding this comment.
I will fix the problem in ReflectionDocblock and come back here.
There was a problem hiding this comment.
next step would be debugging which tag is attempted to be created in the StandardTagFactory (and potentially also debugging what is the doc comment from which the phpdoc is parsed).
I suspect this is an upstream issue.
There was a problem hiding this comment.
There was a problem hiding this comment.
It seems that all we need to do is restart CI after ReflectionDocBlock release.
There was a problem hiding this comment.
|
@stof It looks like everything is ready here. All that's needed is a phpspec release with Symfony 8 support. |
|
I see a new release: https://github.com/phpspec/phpspec/releases/tag/8.2.0
|
|
@stof It would be great if you could merge this. Then I could continue my work. |

The package https://github.com/phpDocumentor/Reflection needs to be upgraded to
phpdocumentor/reflection-docblockv6, but this is currently not possible becausephpspec/prophecyrequires version^5.2.Closes #661