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

Doctrine Migrations causing Doctrine Entity Listener service error #225

Closed
heather817 opened this issue May 9, 2018 · 3 comments
Closed
Assignees

Comments

@heather817
Copy link

I have the following versions:

doctrine/annotations                 v1.4.0  
doctrine/cache                       v1.6.2  
doctrine/collections                 v1.4.0  
doctrine/common                      v2.7.3  
doctrine/dbal                        v2.5.13 
doctrine/doctrine-bundle             1.9.1   
doctrine/doctrine-cache-bundle       1.3.3   
doctrine/doctrine-migrations-bundle  v1.3.1  
doctrine/inflector                   v1.1.0  
doctrine/instantiator                1.0.5   
doctrine/lexer                       v1.0.1  
doctrine/migrations                  v1.5.0  
doctrine/orm                         v2.5.14 

symfony/symfony                      v3.4.9  

I have an entity listener set up according to the service definition at https://symfony.com/doc/master/bundles/DoctrineBundle/entity-listeners.html

It has a service argument for taking the service container (arguments: ["@service_container"]), which is then handled by the symfony dependency injection.

All this was working before I installed the doctrine migrations, then after installing, when flushing I get an error like this:

Catchable Fatal Error: Argument 1 passed to Core\DataFormsBundle\EntityListener\DataFormListener::__construct() must implement interface Psr\Container\ContainerInterface, none given, called in ...\vendor\doctrine\doctrine-bundle\Mapping\ContainerAwareEntityListenerResolver.php on line 76 and defined

Then un-installing doctrine migrations bundle removes the error and the listener works as expected.

Has anyone else had an error like this?

@PReimers
Copy link
Member

@heather817 is this issue still occuring after upgrading to the latest versions?

@PReimers PReimers self-assigned this Nov 23, 2019
@heather817
Copy link
Author

I don't know, I could spend some time with old code, but we moved on to Symfony 4 and have not had any issues with any versions of migrations for Symfony 4.

@PReimers
Copy link
Member

Thank you for your feedback.

I'm closing this issue since it seemed fixed in the current version.

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

No branches or pull requests

2 participants