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

Don't reset Registry if it implements ResetInterface #162

Merged
merged 1 commit into from
Jan 5, 2020

Conversation

dnna
Copy link
Contributor

@dnna dnna commented Jan 3, 2020

Aside from the other issues DoctrineBundle 2.0.6 introduced, it also results in resetting the entity manager twice on every request (one reset is done from Symfony and the other one from us).

This PR prevents this behavior by checking whether the Registry implements ResetInterface and not executing our reset if it does.

@andig
Copy link
Contributor

andig commented Jan 4, 2020

LGTM /cc @acasademont

@acasademont
Copy link
Contributor

acasademont commented Jan 4, 2020

Totally +1. I still need to investigate the causes of doctrine/DoctrineBundle#1114 though and try to understand why are they are always resetting the EM instead of just clearing as we do (except when the EM has been closed)

@andig andig merged commit a559879 into php-pm:master Jan 5, 2020
@andig
Copy link
Contributor

andig commented Jan 5, 2020

CI is broken due to version mismatch, but thats a separate topic. Need to find out if its due to travis composer cache or a real problem.

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.

3 participants