Skip to content

Commit

Permalink
Attempt to fix #122 by trying to make the onFlush subscriber execute …
Browse files Browse the repository at this point in the history
…first (very high priority). (#130)
  • Loading branch information
DamienHarper authored Nov 28, 2019
1 parent 15a5bc4 commit 4c08a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DoctrineAuditBundle/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
class: DH\DoctrineAuditBundle\Event\DoctrineSubscriber
arguments: ["@dh_doctrine_audit.manager"]
tags:
- { name: doctrine.event_subscriber, connection: default }
- { name: doctrine.event_subscriber, connection: default, priority: 1000000 }

dh_doctrine_audit.event_subscriber.create_schema:
class: DH\DoctrineAuditBundle\Event\CreateSchemaListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testItRegistersDefaultServices(): void

$this->assertContainerBuilderHasService('dh_doctrine_audit.event_subscriber.doctrine', DoctrineSubscriber::class);
$this->assertContainerBuilderHasServiceDefinitionWithArgument('dh_doctrine_audit.event_subscriber.doctrine', 0, 'dh_doctrine_audit.manager');
$this->assertContainerBuilderHasServiceDefinitionWithTag('dh_doctrine_audit.event_subscriber.doctrine', 'doctrine.event_subscriber', ['connection' => 'default']);
$this->assertContainerBuilderHasServiceDefinitionWithTag('dh_doctrine_audit.event_subscriber.doctrine', 'doctrine.event_subscriber', ['connection' => 'default', 'priority' => 1000000]);

$this->assertContainerBuilderHasService('dh_doctrine_audit.twig_extension', TwigExtension::class);
$this->assertContainerBuilderHasServiceDefinitionWithArgument('dh_doctrine_audit.twig_extension', 0, 'doctrine');
Expand Down

0 comments on commit 4c08a2c

Please sign in to comment.