Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Conversation

@paulmaclean
Copy link

The dependency injection of repos was throwing resolution exceptions. This fixes it for me, but not sure of any other implications. I think* it is breaking on Laravel 5.5+ due to the auto-discovery feature.

});
$this->app->bind($details['repository'], function ($app) use ($details) {
$class = $details['repository'];
$em = $app['em'];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes will prevent multiple entity manager definitions being bound as $app['em'] is the default. That is why afterResolving was used so that the DoctrineRegistry was available to be able to bind the correct repository. I have a feeling that more changes will be necessary to support >5.5.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants