-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] Make PhpDocExtractor compatible with phpDocumentor v5 #36975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you please check if this change applies to branch 3.4, and rebase+retarget if yes? |
@nicolas-grekas I think it does. I also just found #36850 which makes this a duplicate - is it worth progressing this one too? One major problem both PRs are facing is the lowest/highest dep testing as it means we end up with different behaviour depending on used version of phpDocumentor. Is there a recipe for how to deal with that? Conditional tests sounds a bit ugly to me, although detecting the new |
Conditional testing is the way to go yes. |
@nicolas-grekas I know I said this applies to the 3.4 branch too, but I think things are more complicated. On 3.4 tests fails straight off due to BC breaking changes, for example detection of As far as this PR against 4.4 is concerned - I've made the tests conditional but struggle to find the right way to test for the new code. For some reason the PHP 7.1 tests on travis use phpdocumentor 5.0.0-alpha5. However, the new InvalidTag class was only introduced in alpha8... Finally, there doesn't seem to be any progress on #36850, so I am happy to continue work on this PR if I could get some advice/guidance on the issues described above. |
@nicolas-grekas @stof not sure what the etiquette rules are here, but this needs a re-review and a call on whether 4.4 is the right place for it (it is, IMHO, as outlined in the previous comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(with minor comments)
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php
Outdated
Show resolved
Hide resolved
Version 5 of phpDocumentor introduced some changes to the `getTagsByName()` method that break the `PhpDocExtractor`. More specific, it now returns an instance of `InvalidTag` instead of `null` when parsing an invalid tag.
Thank you @DerManoMann. |
Version 5 of phpDocumentor introduced some changes to the
getTagsByName()
method that break thePhpDocExtractor
.More specific, it now returns an instance of
InvalidTag
instead ofnull
when parsing an invalid tag.