Skip to content

Commit

Permalink
[DoctrineBundle] remove doctrine.event_subscriber tag and replace by …
Browse files Browse the repository at this point in the history
…doctrine.event_listener tag
  • Loading branch information
alli83 committed Apr 21, 2023
1 parent 1550341 commit aec8711
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,10 @@ protected function ormLoad(array $config, ContainerBuilder $container)
]);
}

$def->addTag('doctrine.event_subscriber');
$def
->addTag('doctrine.event_listener', ['event' => 'loadClassMetadata'])
->addTag('doctrine.event_listener', ['event' => 'onClassMetadataNotFound'])
;

Check failure on line 596 in DependencyInjection/DoctrineExtension.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.1)

Space found before semicolon; expected ");" but found ")\n ;"

Check warning on line 596 in DependencyInjection/DoctrineExtension.php

View check run for this annotation

Codecov / codecov/patch

DependencyInjection/DoctrineExtension.php#L593-L596

Added lines #L593 - L596 were not covered by tests
}

$container->registerForAutoconfiguration(ServiceEntityRepositoryInterface::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ public function testResolveTargetEntity(): void

$tags = $definition->getTags();
unset($tags['container.no_preload']);
$this->assertEquals(['doctrine.event_subscriber' => [[]]], $tags);
$this->assertEquals(['doctrine.event_listener' => [['event' => 'loadClassMetadata'], ['event' => 'onClassMetadataNotFound']]], $tags);
}

public function testSchemaIgnoreClasses(): void
Expand Down

0 comments on commit aec8711

Please sign in to comment.