Skip to content

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

Merged

Conversation

bocharsky-bw
Copy link
Member

The nyholm/symfony-bundle-test prevents to upgrade to Symfony 6 completely as symfony/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=true

I tried to upgrade it to the v2.0 and fixed broken tests so that this bundle could use all Symfony 6 packages finally.

@bocharsky-bw
Copy link
Member Author

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.

@robbedg

This comment was marked as outdated.

@bocharsky-bw
Copy link
Member Author

I was able to fix the remaining tests here - I think this PR is ready for the final review!

Copy link
Member

@welcoMattic welcoMattic left a 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&amp;verbose=1" />
Copy link
Member Author

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

Copy link
Member

@rvanlaak rvanlaak left a 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();
Copy link
Member

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.

Copy link
Member Author

@bocharsky-bw bocharsky-bw Sep 7, 2022

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

@rvanlaak rvanlaak self-requested a review September 6, 2022 13:33
@bocharsky-bw bocharsky-bw merged commit 4051a5b into php-translation:master Sep 9, 2022
@bocharsky-bw bocharsky-bw deleted the upgrade-symfony-bundle-test branch September 9, 2022 13:19
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.

4 participants