Skip to content
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

Merged
merged 13 commits into from
Nov 22, 2021
Merged

Add Symfony 6 support #2340

merged 13 commits into from
Nov 22, 2021

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Oct 15, 2021

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.

@@ -36,7 +36,7 @@ protected function getViewHandler()
/**
* {@inheritdoc}
*/
public static function getSubscribedServices()
public static function getSubscribedServices(): array
Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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!

Copy link
Contributor Author

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.

@W0rma
Copy link
Contributor

W0rma commented Oct 16, 2021

@mbabker Thank you very much for working on this!

I have submitted #2341 which should fix the BC layer of the Route annotation for symfony 6.

@W0rma
Copy link
Contributor

W0rma commented Oct 28, 2021

@mbabker Feel free to cherry-pick my commit from #2341

@mbabker mbabker mentioned this pull request Nov 3, 2021
1 task
goetas and others added 2 commits November 15, 2021 07:38
Co-authored-by: W0rma <beck.worma@gmail.com>
Co-authored-by: W0rma <beck.worma@gmail.com>
@goetas
Copy link
Member

goetas commented Nov 16, 2021

Does anyone of you have an idea why https://github.com/FriendsOfSymfony/FOSRestBundle/runs/4215121790?check_suite_focus=true is failing?

@mbabker
Copy link
Contributor Author

mbabker commented Nov 16, 2021

PHP-CS-Fixer doesn’t support SF 6 yet, PHP-CS-Fixer/PHP-CS-Fixer#6095

Adding a composer remove step would get around that one

@W0rma
Copy link
Contributor

W0rma commented Nov 18, 2021

@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.

@goetas
Copy link
Member

goetas commented Nov 21, 2021

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?

@mbabker
Copy link
Contributor Author

mbabker commented Nov 21, 2021

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.

@goetas goetas merged commit a47400d into FriendsOfSymfony:3.x Nov 22, 2021
@goetas
Copy link
Member

goetas commented Nov 22, 2021

thanks everyone for your work! 🎉

@goetas goetas added this to the 3.2 milestone Nov 22, 2021
@mbabker mbabker deleted the symfony-6 branch November 22, 2021 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use InputBag for Request::$request property when able Symfony 6 compatibility
3 participants