-
Notifications
You must be signed in to change notification settings - Fork 700
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
Add Symfony 6 support #2340
Add Symfony 6 support #2340
Conversation
@@ -36,7 +36,7 @@ protected function getViewHandler() | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public static function getSubscribedServices() | |||
public static function getSubscribedServices(): array |
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.
Potential B/C issue, the return type is added in the FrameworkBundle
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.
So this will trigger a fatal error for anyone that extends the AbstractFOSRestController and overrides this method without specifying the return type, right?
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.
I'm not sure how much worth is it, but I've published a merge request to your branch with a backward compatible version of this in mbabker#1
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.
So this will trigger a fatal error for anyone that extends the AbstractFOSRestController and overrides this method without specifying the return type, right?
Right, once the return type is declared somewhere in the hierarchy all sub-classes have to have it. So, your PR would handle that in a B/C way until 4.0 ships. And given how service subscribers are somewhat encouraged and that it's more likely for folks to have an extended version of this method in controllers, I'd say your PR is worth the extra effort.
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.
@mbabker feel free to merge my pull request. after that i think that is if the build is green for this we can merge it!
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.
We'll need #2341 first then we should be good.
Co-authored-by: W0rma <beck.worma@gmail.com>
Does anyone of you have an idea why https://github.com/FriendsOfSymfony/FOSRestBundle/runs/4215121790?check_suite_focus=true is failing? |
PHP-CS-Fixer doesn’t support SF 6 yet, PHP-CS-Fixer/PHP-CS-Fixer#6095 Adding a |
@mbabker I prepared https://github.com/mbabker/FOSRestBundle/pull/2 which should fix the symfony 6 pipeline. See https://github.com/W0rma/FOSRestBundle/actions/runs/1475592791 The pipelines for symfony 5.4 and 6.0 only show some deprecation warnings triggered by vendor packages. |
…, not the services contract
this to me looks good. do you have anyting against waiting for the symfony 6 release or you think that is better to merge it earlier? |
Should be good to land now. Plus, for that small handful of folks who might actually be beta testing 5.4 or 6.0, having this bundle be ready to use would help enable that. |
thanks everyone for your work! 🎉 |
Replaces #2330
Resolves #2332
Fixes #2334
Includes #2341
This will drop support for Symfony 5.0 thru 5.2, since these branches are already past their end of support dates this shouldn't be a huge issue.