-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] Fix BC issue in phpDoc Reflection library #35134
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
Merged
nicolas-grekas
merged 1 commit into
symfony:3.4
from
jaapio:ticket_35077-ban-broken-phpdoc-lib
Jan 4, 2020
Merged
[PropertyInfo] Fix BC issue in phpDoc Reflection library #35134
nicolas-grekas
merged 1 commit into
symfony:3.4
from
jaapio:ticket_35077-ban-broken-phpdoc-lib
Jan 4, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The used phpDocumentor library DocBlockReflection contained an BC break that broke this component. The patch was applied in the recent released v4.3.4 version. But since it is unclear how long this issue existed it is not possible to exclude a certain version. Therefor also `\RuntimeExpception` needs to be catched. The BC break is possibly caused by a change in the TypeResolver library used by the DocBlockReflection which is now supporting the more populair generics notation for arrays.
nicolas-grekas
approved these changes
Dec 31, 2019
xabbuh
approved these changes
Jan 1, 2020
Thank you @jaapio. |
nicolas-grekas
added a commit
that referenced
this pull request
Jan 4, 2020
…jaapio) This PR was merged into the 3.4 branch. Discussion ---------- [PropertyInfo] Fix BC issue in phpDoc Reflection library | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35077 | License | MIT The used phpDocumentor library DocBlockReflection contained a BC break that broke this component. The patch was applied in the recently released v4.3.4 version. But since it is unclear how long this issue existed it is not possible to exclude a certain version. Therefor also `\RuntimeExpception` needs to be caught. The BC break is possibly caused by a change in the TypeResolver library used by the DocBlockReflection which is now supporting the more popular generics notation for arrays. This PR might need some tests but the current test cases are not very clear to me. Instead of patching the code we could also try to ban the broken versions of the used phpdoc libraries, but that would require much more testing, and doesn't really add any value. Especially because the DocBlockReflection and TypeResolver are used by over half a million projects. It would raise more questions than just patching the behavior of the PropertyInfo component. We are sorry that this issue slipt through our QA pipeline. The linked issue already showed that the issue is now fixed by just doing a `composer update` but it is not very convenient to leave this known issue in symfony. Commits ------- bad07ec Fix BC issue in phpDoc Reflection library
Thanks for the quick reviews! And all your awesome work |
This was referenced Jan 21, 2020
Merged
Merged
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The used phpDocumentor library DocBlockReflection contained a BC break
that broke this component. The patch was applied in the recently released v4.3.4
version. But since it is unclear how long this issue existed it is not possible
to exclude a certain version. Therefor also
\RuntimeExpception
needs to be caught.The BC break is possibly caused by a change in the TypeResolver library used by the
DocBlockReflection which is now supporting the more popular generics notation for arrays.
This PR might need some tests but the current test cases are not very clear to me. Instead of patching the code we could also try to ban the broken versions of the used phpdoc libraries, but that would require much more testing, and doesn't really add any value. Especially because the DocBlockReflection and TypeResolver are used by over half a million projects. It would raise more questions than just patching the behavior of the PropertyInfo component.
We are sorry that this issue slipt through our QA pipeline. The linked issue already showed that the issue is now fixed by just doing a
composer update
but it is not very convenient to leave this known issue in symfony.