Open talisman-innovations opened 8 years ago
So I managed to get this to work by injecting the missing information in via the service definition. This works OK, but seems a but convoluted
qpush.doctrine:
class: AppBundle\QPush\DoctrineProvider
arguments: [ "tide_queue1", {}, 'AppBundle\QPush\DoctrineProvider', '@uecode_qpush.file_cache', '@logger']
calls:
- [setEntityManager, ['@doctrine.orm.entity_manager']]`
Hi there! I am interested in your solution for this. Have you completed the provider in the mean time?
Hi - yes we a have a working prototype, but not deployed it in anger yet. Would be good to hear if this is the right way to extend the providers though.
Alright. Well I am still adjusting to Symfony after a some time on Laravel, so I can't really tell if it's the right way :-)
Any progress on this? We could use this for a project here, and I'd like to help finishing the DoctrineProvider if you'll allow me :-)
Hi
Yes we have it all working here. I was thinking of submitting it to the project as a new native provider as the custom provider solution is a pain to work with when you want multiple queues etc. Not had a chance to do that yet though as the code needs a bit of a rework for that. I’ll ask the developer if it would be welcome as an addition
Steve
On 30 Jun 2016, at 09:10, Odinn Adalsteinsson notifications@github.com wrote:
Any progress on this? We could use this for a project here, and I'd like to help finishing the DoctrineProvider if you'll allow me :-)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/uecode/qpush-bundle/issues/97#issuecomment-229591541, or mute the thread https://github.com/notifications/unsubscribe/AO7HJ3vbvCANSyI-raF68tMYjUTwBGLUks5qQ3oJgaJpZM4IdPxG.
I'd be very happy with your working solution as is and rework it as needed, since we're in a situation using the file provider and it backfiring on us due to filesystem rights. So I'd have to implement it myself anyway if I can't use yours.
Check out pull request #110 for a native implementation of a doctrine provider.
Hi
I'm trying to write a custom provider which uses a DB via Doctrine to queue and persist the messages. I've run some tests using the sync driver which works fine. I've now implemented the beginning of the custom provider by implementing ProviderInterface. However when I try to use the new custom queue I get the following message
Warning: Missing argument 1 for AppBundle\QPush\DoctrineProvider::__construct(), called in /Users/sbrookes/Development/symfony/app/cache/dev/appDevDebugProjectContainer.php on line 1839 and defined
As if the customer provider isn't calling the constructor with any arguments. Any ideas or some working code that implements a custom provider I can work from?
Thanks
Steve
Section from config.yml
Services.yml
DoctrineProvider.php
namespace AppBundle\QPush;
use Doctrine\Common\Cache\Cache; use Symfony\Bridge\Monolog\Logger; use AppBundle\Entity\DoctrineMessage; use Uecode\Bundle\QPushBundle\Event\MessageEvent; use Uecode\Bundle\QPushBundle\Message\Message; use Uecode\Bundle\QPushBundle\Provider\ProviderInterface;
class DoctrineProvider implements ProviderInterface { protected $em;
Other functions still in development