[PropertyInfo] Make PhpDocExtractor compatible with phpDocumentor v5#36975
[PropertyInfo] Make PhpDocExtractor compatible with phpDocumentor v5#36975fabpot merged 1 commit intosymfony:4.4from DerManoMann:phpdocumentor-v5-compat
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) |
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
InvalidTaginstead ofnullwhen parsing an invalid tag.