-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Testing standalone bundle - got 'Could not find service "test.service_container".' #41715
Comments
Can you create a small example application that allows to reproduce your issue? |
Sure, you can check out this https://github.com/inspector-apm/inspector-symfony/tree/0b5af59e85766f33fa5045bccc8c1929587bd4d8 and try to launch tests |
That's because in 5.3 we unconditionally use the |
…_container" (smilesrg) This PR was merged into the 5.2 branch. Discussion ---------- [FrameworkBundle] fix Could not find service "test.service_container" | Q | A | ------------- | --- | Branch? | 5.2, needs to be ported to 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #41715 | License | MIT Partial backport of #41530 Related to #41715 and #41530 When launching phpunit, got an error: `LogicException: Could not find service "test.service_container". Try updating the "framework.test" config to "true".` ``` There was 1 error: 1) App\Symfony\Bundle\Tests\Integration\IntegrationTest::testServiceWiringWithConfiguration LogicException: Could not find service "test.service_container". Try updating the "framework.test" config to "true". /Projects/app/vendor/symfony/framework-bundle/Test/KernelTestCase.php:109 /Projects/app/tests/integration/IntegrationTest.php:23 Caused by Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "test.service_container". Did you mean this: "service_container"? /Projects/app/vendor/symfony/dependency-injection/Container.php:280 /Projects/app/vendor/symfony/dependency-injection/Container.php:228 /Projects/app/vendor/symfony/framework-bundle/Test/KernelTestCase.php:107 /Projects/app/tests/integration/IntegrationTest.php:23 ``` /cc `@xabbuh` `@nicolas`-grekas Commits ------- 0748b52 bug #41715: [FrameworkBundle] Partial backport of PR#41530
* 5.2: bug #41715: [FrameworkBundle] Partial backport of PR#41530 Fix some typos in Greek language Remove TLS related options when not using TLS
* 5.3: [FrameworkBundle] fix leftover [Uid] fix performance and prevent collisions with the real clock_seq Fix RequestContext not updated bug #41715: [FrameworkBundle] Partial backport of PR#41530 [Security] Restore extension point in MessageDigestPasswordEncoder Fix some typos in Greek language [Security] Fix deprecation notice on TokenInterface::getUser() stringable return Remove TLS related options when not using TLS
* 5.4: [FrameworkBundle] fix leftover [Uid] fix performance and prevent collisions with the real clock_seq Fix RequestContext not updated bug #41715: [FrameworkBundle] Partial backport of PR#41530 [Security] Restore extension point in MessageDigestPasswordEncoder Fix some typos in Greek language [Security] Fix deprecation notice on TokenInterface::getUser() stringable return Remove TLS related options when not using TLS
I'm writing a standalone bundle and trying to test it. But got an error:
LogicException: Could not find service "test.service_container". Try updating the "framework.test" config to "true".
I couldn't find anything in the documentation related to this error. How can I fix that?
UPD: I tried obvious solution by creating
config/config_test.yml
and even renamed extension to.yaml
but it didn't help, content of the file is:The content of
phpunit.xml.dist
(renamed to.txt
due to github limitations):phpunit.txt
The text was updated successfully, but these errors were encountered: