-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Console] Revert adding return type on Command::execute() #51458
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
*/ | ||
public function getConfigTreeBuilder(): TreeBuilder; | ||
public function getConfigTreeBuilder(); |
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 one has already been delayed from 6.0 to 7.0, throwing a deprecation warning since 5.3.
Same for the Command execute method. If 2.5 years is not enough to get them to release a version with a return type, what will happen in 8.0 in 2 years ? Will we delay it again ?
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.
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.
Well, for the void type in load, I'm fine with delaying it to give more time if needed, as that's much newer (we started reporting a deprecation for it in 6.2 only)
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.
monolog-bunde updated symfony/monolog-bundle#461
Btw, the dev version of TwigExtraBundle has the native return type. |
* @throws \InvalidArgumentException in case of unknown driver type | ||
*/ | ||
protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName): void | ||
protected function loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, string $cacheName) |
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 one could be skipped from this PR. There is an open PR in DoctrineBundle removing the method override entirely (which can be done in a minor version) because the implementation in DoctrineBundle matches the implementation in the bridge in all supported Symfony versions (as it does not support older versions anymore where the bridge was different)
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.
thanks for the hint (here is the PR in question: doctrine/DoctrineBundle#1692)
43b6dcf
to
fc4ceac
Compare
PR updated to target only |
@nicolas-grekas |
Forever I don't know, but we must ensure we keep working with Doctrine, and their next major is not close to any adoption. DBAL also would need a new major. We don't have a choice for now. |
Do you have a list of Doctrine commands that are affected by this? I don't want to be the one blocking that return type forever. The ORM should be fine and the DBAL has two commands that need to be patched. Anything else? |
@derrabus looks like most ORM commands in 2.16.x are affected. They don't have native return types. |
Right, my bad. I was looking at the wrong branch. 🙈 |
See doctrine/orm#10919.
|
So if the ORM PR gets merged, I think we can close this one without merging. I fully agree with @stof that we should be very reluctant to delay return types for yet another major version, even if this means pushing maintainers for important ecosystem projects like Doctrine or Monolog imho. |
PRs have been merged to DBAL 3.7 and ORM 2.17. |
Closing then, thanks for the update on Doctrine's side. |
I tried running a Symfony v7 "webapp-pack" and this is all that is needed to not force doctrine to release new major versions to support it.