schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
334 stars 254 forks source link

Symfony 4: Error : Call to a member function getManagerForClass() on null #212

Closed modstore closed 5 years ago

modstore commented 6 years ago

I'm currently upgrading my symfony 3.3 project to 4. I'm getting this error with the following code:

$existingJob = $this->em->getRepository(Job::class)->findJobForRelatedEntity( 'app:my-command', $product, [Job::STATE_PENDING, Job::STATE_RUNNING] );

I thought maybe I need the di-extra-bundle, but there doesn't seem to be a compatible version.

schmittjoh commented 5 years ago

fixed by the latest version