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 support for symfony 6 #566

Merged
merged 20 commits into from
Dec 12, 2021

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Oct 12, 2021

Not sure how the test matrix need to be changed locally tests running when doing:

composer config minimum-stability dev
composer update
vendor/bin/phpunit

Fixes #564

Not sure how to fix the psalm error. Feel free to push into my branch.

@alexander-schranz alexander-schranz force-pushed the feature/symfony-6-support branch 3 times, most recently from 279811c to e8e33f9 Compare October 12, 2021 22:15
composer.json Outdated Show resolved Hide resolved
src/EventListener/RequestListener.php Outdated Show resolved Hide resolved
tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 👍

Can you add a changelog entry?
Also, I would like to add a CI job to test this, but I think we will need to require the newer Symfony version in some special way?

@alexander-schranz
Copy link
Contributor Author

Also, I would like to add a CI job to test this, but I think we will need to require the newer Symfony version in some special way?

You can test again dev dependencies using before running composer update:

composer config minimum-stability dev

tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
Co-authored-by: Stefano Arlandini <[email protected]>
@ste93cry
Copy link
Collaborator

@alexander-schranz do you plan to keep working on this? Otherwise, I would be happy to take over your work and finish it

@alexander-schranz
Copy link
Contributor Author

@ste93cry sorry for the late response. I pushed an update to use a different UserStub, still feel free to take it over as a maintainer you should have permissions to directly push here into my branch.

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small nitpick, the rest LGTM 👍

@ste93cry do we want to wait for the official tag to merge?

composer.json Outdated Show resolved Hide resolved
Co-authored-by: Alessandro Lai <[email protected]>
@ste93cry
Copy link
Collaborator

do we want to wait for the official tag to merge?

I would prefer so, so that we can test the CI on the stable version before merging. It should be a matter of a couple of days, so it doesn't really change anything

@jmsche
Copy link

jmsche commented Nov 30, 2021

Hi, Symfony 6.0 has been released :)

@ste93cry
Copy link
Collaborator

Yup, I'm aware of it. Unfortunately now that we can test the stable version more deprecations than expected popped out, plus some of our dependencies are still not compatible with the 6.x components. I will solve as much problems as I can, but the next release will have to wait a bit more

@Jean85
Copy link
Collaborator

Jean85 commented Dec 1, 2021

Main blocker seems PHP-CS-Fixer/PHP-CS-Fixer#6095; but since it's the CS fixer, we could manually remove it in the main jobs to avoid the failures.

@ste93cry
Copy link
Collaborator

ste93cry commented Dec 1, 2021

Actually we have also some issues with PHPStan, Psalm, and PHP-CS-Fixer is hiding some deprecations/incompatibilities with Symfony 6. I don't want to wait forever, just to be clear, but I don't see any need to rush a release. Upgrading immediatly to something entirely new is discouraged anyway in most environments, so waiting a few days/a week is not that bad after all

@pietereggink
Copy link

I see that quality checks currently running under php 8.1? Symfony 6 requires 8.0.2. So those deprecations should be fixed in php 8.1 but from my point of view this should be done in a separate pull request right?

composer.json Outdated Show resolved Hide resolved
@ste93cry
Copy link
Collaborator

ste93cry commented Dec 9, 2021

Just a quick update: PHP-CS-Fixer merged the support for PHP 8.1 and Symfony 6.x, therefore I expect a release shortly. On top of this, we're hitting a bug in the lowest version we require of PHPUnit while mocking methods using nullable union types and I'm understanding if we can get a patch version for it. If not, I will simply do some magic trick in the CI to raise the minimum version for the impacted cases so that next week we can release this package. Thank you all for understanding

@ste93cry ste93cry merged commit 251114f into getsentry:master Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants