JMSJobQueueBundle
JMSJobQueueBundle copied to clipboard
Override/extends the bundle not possible
It's not possible to override JobController actions. It will always load the Parent bundle controller and not the child.
The problem seems to be this bundle: JMS\DiExtraBundle\JMSDiExtraBundle
Just removing that bundle makes the overriding process work by the book. Ofcourse JobQueueBundle doesn't work anymore.
So right now I'm not able to use this bundle at all because i can't extend the functionality and integrate it into my app.
+1. Related to #39?
I'd like to add some fields to a Job (i.e. user_id or a user friendly description)
As for user_id, you can add related entities to a job.
I think that's more complicated than it can (should?) be. I'd like to add a user field to a Job, so I can use my ORM to get all jobs of a user ($user->getJobs()
).
With FOSUserBundle, you can easily extend the User entity, so you can add fields to an entity, without losing the core features: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md. You can extend the controllers as well: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_controllers.md
Do you agree this can be a great feature? I can try to make a PR.
I would like to use another jobPagerView
but extending the controller does not work.
Seems related to: https://github.com/schmittjoh/JMSDiExtraBundle/issues/39 Temp solution: http://stackoverflow.com/a/21103923
Update: I needed to remove JMSDiExtraBundle as it broke my custom table naming functionality (actually not related to the job controller at all). Not sure why, probably it adds some caching to the doctrine manager class. I tried to extend the controller and inject the dependencies the default Symfony way (using controller as service) but this seems impossible as the needed properties are declared as private. Ended up with a copy of the whole controller.
Any reason not to declare the properties and helper methods as protected to ease up extending and modifying the controller?
@schmittjoh I have same issue as @stephanvierkant , I would like to extend Job entity to add some attributes. I tried to do it dynamically, but it does not work.
Is there a reason why the Job entity is not as MappedSuperclass ?
@schmittjoh, @JonathanBaudoin and @stephanvierkant, We have same issue.
https://github.com/schmittjoh/JMSJobQueueBundle/issues/198