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

Symfony/fix_profiler_loading #4437

Merged
merged 1 commit into from Aug 10, 2017

Conversation

Projects
None yet
2 participants
@samusenkoiv
Contributor

samusenkoiv commented Aug 9, 2017

  • Problem:
    When I have several request within one test, my services have different entity_managers, which results in bugs.

  • Problem cause:
    When profiler service is being loaded, dozens of services are instantiated. Some of them needs entity_manager, which has not been instantiated by that time, so it is null, and so container creates new one. Then we set persistent_services (which include entity_manager), so all the other services will get entity_manager from persistent_services, not the one created during profiler enabled.

  • Solution:
    Set the persistent services and then enable the profiler.

symfony/fix_profiler_loading set persistent services before loading p…
…rofiler (this prevents services being instantiated during profiler instantiating getting wrong dependencies (they're going to be replaced during setting _persistent_services_)
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Aug 10, 2017

Member

Yep, makes sense for your case. Thank you

Member

DavertMik commented Aug 10, 2017

Yep, makes sense for your case. Thank you

@DavertMik DavertMik merged commit dcc26ac into Codeception:2.3 Aug 10, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment