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

check if entity manager has been retrieved #4529

Merged
merged 1 commit into from Sep 25, 2017

Conversation

Projects
None yet
3 participants
@samusenkoiv
Contributor

samusenkoiv commented Sep 22, 2017

I use the following config:

modules:
    enabled:
      - DataFactory
          depends: Doctrine2
      - Doctrine2

which results in getting the following error:

[League\FactoryMuffin\Exceptions\SaveMethodNotFoundException] The save method 'persist' was not found on the model: 'League\FactoryMuffin\Stores\RepositoryStore'.

The reason is the sequence of modules - DataFactory::_before executes sooner then Doctrine2::_before , so DataFactory has null as $em.

As a workaround you can change the sequence of modules.
This PR solves the issue.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Sep 25, 2017

Member

Thanks!

Member

DavertMik commented Sep 25, 2017

Thanks!

@DavertMik DavertMik merged commit 853f051 into Codeception:2.3 Sep 25, 2017

1 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
semaphoreci The build failed on Semaphore.
Details
wercker/build Wercker pipeline failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@samusenkoiv samusenkoiv deleted the samusenkoiv:doctrine2-fix-_getEntityManager branch Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment