-
Notifications
You must be signed in to change notification settings - Fork 6
[TASK] Temporarily workaround a missing conflict in symfony/type-info #9
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
|
Tested (by installing as a local package repository and faking to be version 3.1.2): Successfully downgrades even instances that have been updated to |
`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)
26b168b to
c89a245
Compare
|
Hi, I have a question about the Environment
Relevant Composer output: composer show typo3/cms-cli --all
-> conflicts: phpstan/phpdoc-parser <1.0 || >=2.0
composer why phpstan/phpdoc-parser
- phpdocumentor/reflection-docblock 5.6.4 requires phpstan/phpdoc-parser (^1.7|^2.0)
- phpdocumentor/type-resolver 1.11.1 requires phpstan/phpdoc-parser (^1.18|^2.0)
- symfony/type-info v7.3.5 conflicts phpstan/phpdoc-parser (<1.30)
- typo3/cms-cli 3.1.2 conflicts phpstan/phpdoc-parser (<1.0 || >=2.0)Background As far as I understand, the conflict was introduced as a workaround for the Symfony In the meantime, Symfony seems to have adjusted their constraints:
This means the original Symfony-side incompatibility appears to be fixed, while the TYPO3-side workaround in Concrete problem In a TYPO3 13.4.20 project with the setup above, trying to install Symfony AI components fails because of the composer require symfony/ai-platform -WResults in (excerpt): symfony/ai-platform dev-main requires phpstan/phpdoc-parser ^2.1
typo3/cms-cli 3.1.2 conflicts with phpstan/phpdoc-parser 2.3.0
typo3/cms-core v13.4.20 requires typo3/cms-cli ^3.1.1 -> satisfiable by typo3/cms-cli[3.1.2]So at the moment, installing symfony/ai-platform / symfony/ai-store in a TYPO3 project is blocked by the cms-cli conflict. Question Is the broad conflict "conflict": {
"phpstan/phpdoc-parser": "<1.0 || >=2.0"
}still required now that Symfony’s type-info / property-info stack supports phpstan/phpdoc-parser 2.x? If there is no remaining known runtime issue, would it be possible to relax this constraint (for example align it with Symfony’s phpstan/phpdoc-parser <1.30), or remove the upper bound, so that TYPO3-based projects can opt into phpstan/phpdoc-parser ^2.1 when they need newer tooling (like Symfony AI components)? I’m happy to test a dev build of typo3/cms-cli without the upper-bound conflict (or with a narrower one) in a TYPO3 13.4.x project and report back. Thanks! |
|
@AstritA Yes, the workaround can be removed by now. Thanks for the HEADS UP. |
symfony/type-infois currently not compatible tophpstan/phpdoc-parser2.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-docblock5.6.0 [1] was released yesterday which allowscomposer installandcomposer updateto raisephpstan/phpdoc-parserto 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-parser2.x has been released and is allowed to be installed by other dependencies likephpdocumentor/reflection-docblock(which is perfectly fine), this range flaw got revealed.This workaround will be removed once
symfony/type-infohas been updated to allow an upgrade tophpstan/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-infois).[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)