-
Notifications
You must be signed in to change notification settings - Fork 93
Upgrade the SymfonyBundleTest #481
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
Upgrade the SymfonyBundleTest #481
Conversation
If anybody has an idea how to fix those remaining 2 failed tests: https://github.com/php-translation/symfony-bundle/runs/8169007599?check_suite_focus=true - please, share. |
This comment was marked as outdated.
This comment was marked as outdated.
I was able to fix the remaining tests here - I think this PR is ready for the final review! |
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.
🎉
@@ -12,7 +12,8 @@ | |||
> | |||
<php> | |||
<env name="ENV" value="test" /> | |||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="verbose=1" /> | |||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=29&verbose=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.
We still have some deprecations that would be good to fix in separate PRs, I suppress them for now with this line to have GA actions completely green
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.
Great work!
$container = $this->getContainer(); | ||
$kernel = $this->testKernel; | ||
$kernel->boot(); | ||
$container = $kernel->getContainer(); |
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 always actually use $this->getContainer()
and it internally keeps track on whether the kernel is booted.
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.
Yeah, but the problem is that I somehow cannot made this work with the parent $kernel
so I created a custom testKernel
property in BaseTestCase
to add some config files and therefore we have to call getContainer()
on it.
If anyone could rewrite it with the parent $kernel
and self::getContainer()
and get tests passed - it would be cool, I agree... but I'm really giving up with it
The
nyholm/symfony-bundle-test
prevents to upgrade to Symfony 6 completely assymfony/framework-bundle
because it's installed as 5.4 for the current version SymfonyBundleTest version, see installed deps here: https://github.com/php-translation/symfony-bundle/runs/8168054961?check_suite_focus=trueI tried to upgrade it to the v2.0 and fixed broken tests so that this bundle could use all Symfony 6 packages finally.