-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Readd missing php-doc parameter for constructor #42281
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
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
The change was introduced in #41992 |
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.
This looks like an issue of the tool that you are using there. I'm very much against re-introducing redundant doc block annotations.
@derrabus i agree that those comments are not really usefull, nethertheless all magento2 builds use this module and do generate interceptors (for a precompiled aop solution) which uses the method parameter php-doc (if present) - therefore many shops have to update their versions either to fixate it to v4.4.26 or add a patch where the @params are added again to gain a green build |
Okay and why can't this be fixed on Magento's side? |
@derrabus: Magento really needs to fix this, but the release cycle of Magento is super slow and upgrades from one version of Magento to another are very tedious and take a lot of time, even for minor releases. So even if Magento released a new version (next one is scheduled for 2022, they will only release security fixes in 2021 anymore), it would take people a lot of time and effort to upgrade to it. |
@brosenberger There are multiple packages that do the same thing, including many Doctrine packages. These two parameters are self-explanatory through the signature and the documentation adds no value (especially since Symfony no longer publishes this documentation IIRC). Slow release process aside, I don't think this issue should be fixed anywhere but in Magento itself. |
So Magento is basically not doing bugfix releases? |
@alcaeus IMHO, using a mixed approach for DocBlock annotation may be not the best. At least when you read reduced DocBlock, it does not contribute to a better understanding. I would say it can be confusing |
Are you completely sure this is the only phpdoc that Magento needs? We removed much more, that's why I'm asking. |
@nicolas-grekas currently Magento has dependency on "symfony/console": "~4.4.0". |
Magento make quarterly releases, and anything else has to be patched manually on each shops either by using magentos patch tool (with a limited amount of patches) ; by using patch command on Linux or a library like cweagans. So this is possible, but as stated by @hostep it will require alot of work by alot of people (all shops individually) |
They'll have to. We really cannot anticipate which doc block change might break this little Magento tool again.
The next regular release would be by the end of August. |
@derrabus I fully agree with you, Why in the world is Magento not reading the "variables type properly", it is already defined in the construct itself! if not then and only then can fall back to PHP variables annotations. Anyhow, I think the point here is to be part of the solution; if we can let this one slide so not everyone gets into this problem until a proper fix is presented in Magento would be highly appreciated. |
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.
Agreed.
Thank you @brosenberger. |
To be extra-sure: Can you please test your Magento installations with: {
"symfony/console": "^4.4.29@dev"
} … and confirm that the issue is gone and that there is no other doc block that breaks that tool? |
As suggested by @nicolas-grekas, I have reverted the change while merging to the 5.4 branch. |
@nicolas-grekas you shouldn't pay the Magento debt :( |
hi @derrabus, Thank you for your help with this. We can confirm that everything works on Magento side with this change. |
Hi @derrabus, |
@fabpot just did that. |
FYI The original issue in the |
partly revert the php constroctur php doc (readd missing php-doc for $name and $description) even if they not that meaningfull
This is needed as Magento2 uses this library and needs all php-doc parameter for interception compilation. if there are any missing parameters (in this case $name and $description) break compile step as the parameters are missmatching the actual parameters:

(AbstractConfigOption extends InputOption)