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

Skip resetting managers when proxy-manager is not installed #1106

Merged
merged 1 commit into from Dec 18, 2019

Conversation

nicolas-grekas
Copy link
Member

Fixes #1105

@alcaeus alcaeus added the Bug label Dec 18, 2019
@alcaeus alcaeus added this to the 1.12.5 milestone Dec 18, 2019
@alcaeus alcaeus merged commit 5d477e6 into doctrine:1.12.x Dec 18, 2019
@alcaeus
Copy link
Member

alcaeus commented Dec 18, 2019

Thanks @nicolas-grekas!

@ro0NL
Copy link

ro0NL commented Dec 18, 2019

@nicolas-grekas im afraid it doesnt solve our issue, after updating to 1.12.5 test still fail.

$ composer why ocramius/proxy-manager
doctrine/migrations  2.2.0  requires  ocramius/proxy-manager (^2.0.2)

😁

here's a stack trace:

LogicException: Resetting a non-lazy manager service is not supported. Declare the "doctrine.orm.default_entity_manager" service as lazy.

/app/var/symfony-src/src/Symfony/Bridge/Doctrine/ManagerRegistry.php:53
/app/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php:235
/app/vendor/doctrine/doctrine-bundle/Registry.php:178
/app/var/symfony-src/src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php:39
/app/var/symfony-src/src/Symfony/Component/HttpKernel/Kernel.php:113
/app/var/symfony-src/src/Symfony/Component/HttpKernel/Kernel.php:196
/app/var/symfony-src/src/Symfony/Component/HttpKernel/Client.php:65
/app/var/symfony-src/src/Symfony/Bundle/FrameworkBundle/Client.php:131
/app/var/symfony-src/src/Symfony/Component/BrowserKit/Client.php:404
/app/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Client.php:124
/app/tests/functional/ApiTest.php:118

The doctrine.orm.default_entity_manager service is untouched on our side.

ApiTest.php:118 evolves around

$client = ApiPlatform\Core\Bridge\Symfony\Bundle\Test\ApiTestCase::createClient();
$client->disableReboot();
$client->request('GET', $iri); // L118

@nicolas-grekas
Copy link
Member Author

Grrr :)
Could you please work on a fix? I think you're the best to find the proper fix at this stage...

@ro0NL
Copy link

ro0NL commented Dec 18, 2019

@nicolas-grekas i'll dive in tomorrow... in general i think in our case it's related to stateful testing (disableReboot), so the reset is involved. I dont think it actually happens in web ... but i havent checked even :)

i figure the related PR is #1099

without knowing all the details... ultimately it's a BC break where it tries to reset it's own non-lazy service 🤔

cc @alcaeus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants