-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] fix support for phpstan/phpdoc-parser 2 #58800
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
xabbuh
commented
Nov 7, 2024
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 5.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Issues | Fix #58796 |
License | MIT |
Thank you Christian. |
Hey, can you estimate when this fix is going to be released? https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 was released today which added support for In TYPO3, where Also see: https://forge.typo3.org/issues/105582 |
We do monthly releases, so this change will be released by the end of the month. |
Thanks for the answer.
|
We don't declare an explicit dependency because this is an optional dependency of the component. You could totally configure the type-info component without enabling support for parsing phpdoc (relying only on native types) if you don't need the more precise types supported only in phpdoc (which is what FrameworkBundle does if the dependency is not available, btw). |
Sorry for discussing in here. https://symfony.com/doc/current/components/property_info.html#phpdocextractor states that
We're using We'not using Therefore Also we do not require Since https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 was released today and now pulls in The problem I see is:
We'll now ask our community to apply a hotfix like the following do force a downgrade without specifying an unneeded dependency:
…but we already received complains for composer-updates in the meantime. |
FrameworkBundle does not check which requirements you put in your vendor folder. It checks what is installed in the vendor folder.
you can also ask them to run |
Thanks a lot. That oneline is much better. I'm still sure that this conflict is wrong:
It should have been:
…and now that v2 compatibility has been assured it should of course be:
|
That is why I'm asking for a hotfix release. It seems everyone is affected who installs or updates CC @jaapio (whom I do not see as responsible – we just talked via direct messages – but revealed this with his https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 update today). Maybe he can share his take on this situation. |
Also in api-platform/core project they run in issues from new phpstan/phpdoc-parser release. As workaround projects could add following to their own composer.json file: "conflict": {
...,
"phpstan/phpdoc-parser": "<1.0 || >=2.0"
} |
There is not much I can do. The version constraint seems to be missing as the package is not compatible with the new version of phpstan/phpdoc-parser. We might want to prevent this in the future. For now the only reasonable fix would be a hotfix release from Symfony. Even reverting the changes on my side would not solve anything as it would block symfony 's upgrade path. And composer would still be able to resolve a set containing the V2 version of the docblock parser. To be fair, the actual origin of issues are the devs who just randomly update all their packages without reviewing what they actually do. We as maintainers cannot prevent all stupidity. But we can try to prevent it. It would at least reduce the number of emails and issues reported to us. |
… for composer tests `symfony/type-info` is currently not compatible to `phpstan/phpdoc-parser` 2.x which results in a PHP error in extbase modules as shown in https://forge.typo3.org/issues/105582. A fix has been merged upstream, but has not been released yet and it seems there will be no immediate hotfix release by symfony – that means it will only be released by the end of the month [2]). Explanation of the issue: `phpdocumentor/reflection-docblock` 5.6.0 [1] was released yesterday which allows `composer install` and `composer update` to raise `phpstan/phpdoc-parser` to 2.x. Since symfony/type-info has an optional dependency to `phpstan/phpdoc-parser`, a conflict is used to express the supported version. This upstream conflict has a weak range [3] as it only forbids incompatible old versions, but not new upcoming *major*(!) versions. The statement `"conflict": "<1.0"`[3] forbids to install any version before 1.0, but missed to opt out from future major releases (which are allowed to be breaking per semver). Now that `phpstan/phpdoc-parser` 2.x has been released and is allowed to be installed by other dependencies like `phpdocumentor/reflection-docblock` (which is perfectly fine), this range flaw got revealed. This workaround will be removed once `symfony/type-info` has been updated to allow an upgrade to `phpstan/phpdoc-parser`. For that reason this conflict is only added to the testing instance and not to extbase (extbase is incompatible, `symfony/type-info` is). [1] https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 [2] symfony/symfony#58800 (comment) [3] https://github.com/symfony/type-info/blob/v7.1.6/composer.json#L36-L37 [4] symfony/symfony#58800 (comment)
`symfony/type-info` is currently not compatible to `phpstan/phpdoc-parser` 2.x which results in a PHP error in extbase modules as shown in https://forge.typo3.org/issues/105582. A fix has been merged upstream, but has not been released yet and it seems there will be no immediate hotfix release by symfony – that means it will only be released by the end of the month [2]). Explanation of the issue: `phpdocumentor/reflection-docblock` 5.6.0 [1] was released yesterday which allows `composer install` and `composer update` to raise `phpstan/phpdoc-parser` to 2.x. Since symfony/type-info has an optional dependency to `phpstan/phpdoc-parser`, a conflict is used to express the supported version. This upstream conflict has a weak range [3] as it only forbids incompatible old versions, but not new upcoming *major*(!) versions. The statement `"conflict": "<1.0"`[3] forbids to install any version before 1.0, but missed to opt out from future major releases (which are allowed to be breaking per semver). Now that `phpstan/phpdoc-parser` 2.x has been released and is allowed to be installed by other dependencies like `phpdocumentor/reflection-docblock` (which is perfectly fine), this range flaw got revealed. This workaround will be removed once `symfony/type-info` has been updated to allow an upgrade to `phpstan/phpdoc-parser`. For that reason this conflict is only added to this composer-only package to avoid a comlete TYPO3 release and is not added to extbase (extbase is not incompatible, `symfony/type-info` is). [1] https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 [2] symfony/symfony#58800 (comment) [3] https://github.com/symfony/type-info/blob/v7.1.6/composer.json#L36-L37 [4] symfony/symfony#58800 (comment)
`symfony/type-info` is currently not compatible to `phpstan/phpdoc-parser` 2.x which results in a PHP error in extbase modules as shown in https://forge.typo3.org/issues/105582. A fix has been merged upstream, but has not been released yet and it seems there will be no immediate hotfix release by symfony – that means it will only be released by the end of the month [2]). Explanation of the issue: `phpdocumentor/reflection-docblock` 5.6.0 [1] was released yesterday which allows `composer install` and `composer update` to raise `phpstan/phpdoc-parser` to 2.x. Since symfony/type-info has an optional dependency to `phpstan/phpdoc-parser`, a conflict is used to express the supported version. This upstream conflict has a weak range [3] as it only forbids incompatible old versions, but not new upcoming *major*(!) versions. The statement `"conflict": "<1.0"`[3] forbids to install any version before 1.0, but missed to opt out from future major releases (which are allowed to be breaking per semver). Now that `phpstan/phpdoc-parser` 2.x has been released and is allowed to be installed by other dependencies like `phpdocumentor/reflection-docblock` (which is perfectly fine), this range flaw got revealed. This workaround will be removed once `symfony/type-info` has been updated to allow an upgrade to `phpstan/phpdoc-parser`. For that reason this conflict is only added to this composer-only package to avoid a comlete TYPO3 release and is not added to extbase (extbase is not incompatible, `symfony/type-info` is). [1] https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 [2] symfony/symfony#58800 (comment) [3] https://github.com/symfony/type-info/blob/v7.1.6/composer.json#L36-L37 [4] symfony/symfony#58800 (comment)
`symfony/type-info` is currently not compatible to `phpstan/phpdoc-parser` 2.x which results in a PHP error in extbase modules as shown in https://forge.typo3.org/issues/105582. A fix has been merged upstream, but has not been released yet and it seems there will be no immediate hotfix release by symfony – that means it will only be released by the end of the month [2]). Explanation of the issue: `phpdocumentor/reflection-docblock` 5.6.0 [1] was released yesterday which allows `composer install` and `composer update` to raise `phpstan/phpdoc-parser` to 2.x. Since symfony/type-info has an optional dependency to `phpstan/phpdoc-parser`, a conflict is used to express the supported version. This upstream conflict has a weak range [3] as it only forbids incompatible old versions, but not new upcoming *major*(!) versions. The statement `"conflict": "<1.0"`[3] forbids to install any version before 1.0, but missed to opt out from future major releases (which are allowed to be breaking per semver). Now that `phpstan/phpdoc-parser` 2.x has been released and is allowed to be installed by other dependencies like `phpdocumentor/reflection-docblock` (which is perfectly fine), this range flaw got revealed. This workaround will be removed once `symfony/type-info` has been updated to allow an upgrade to `phpstan/phpdoc-parser`. For that reason this conflict is only added to this composer-only package to avoid a comlete TYPO3 release and is not added to extbase (extbase is not incompatible, `symfony/type-info` is). [1] https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 [2] symfony/symfony#58800 (comment) [3] https://github.com/symfony/type-info/blob/v7.1.6/composer.json#L36-L37 [4] symfony/symfony#58800 (comment)
`symfony/type-info` is currently not compatible to `phpstan/phpdoc-parser` 2.x which results in a PHP error in extbase modules as shown in https://forge.typo3.org/issues/105582. A fix has been merged upstream, but has not been released yet and it seems there will be no immediate hotfix release by symfony – that means it will only be released by the end of the month [2]). Explanation of the issue: `phpdocumentor/reflection-docblock` 5.6.0 [1] was released yesterday which allows `composer install` and `composer update` to raise `phpstan/phpdoc-parser` to 2.x. Since symfony/type-info has an optional dependency to `phpstan/phpdoc-parser`, a conflict is used to express the supported version. This upstream conflict has a weak range [3] as it only forbids incompatible old versions, but not new upcoming *major*(!) versions. The statement `"conflict": "<1.0"`[3] forbids to install any version before 1.0, but missed to opt out from future major releases (which are allowed to be breaking per semver). Now that `phpstan/phpdoc-parser` 2.x has been released and is allowed to be installed by other dependencies like `phpdocumentor/reflection-docblock` (which is perfectly fine), this range flaw got revealed. This workaround will be removed once `symfony/type-info` has been updated to allow an upgrade to `phpstan/phpdoc-parser`. For that reason this conflict is only added to this composer-only package to avoid a comlete TYPO3 release and is not added to extbase (extbase is not incompatible, `symfony/type-info` is). [1] https://github.com/phpDocumentor/ReflectionDocBlock/releases/tag/5.6.0 [2] symfony/symfony#58800 (comment) [3] https://github.com/symfony/type-info/blob/v7.1.6/composer.json#L36-L37 [4] symfony/symfony#58800 (comment)