Skip to content

Commit

Permalink
do not use loaded event custom name, as per symfony 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Jun 16, 2019
1 parent 5ef5a40 commit 564e193
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/Event/ClassMetadataLoadedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

class ClassMetadataLoadedEvent extends Event
{
public const LOADED_EVENT = 'kcs_metadata.metadata_loaded';

/**
* @var ClassMetadataInterface
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Factory/AbstractMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function dispatchClassMetadataLoadedEvent(ClassMetadataInterface $clas
return;
}

$this->eventDispatcher->dispatch(new ClassMetadataLoadedEvent($classMetadata), ClassMetadataLoadedEvent::LOADED_EVENT);
$this->eventDispatcher->dispatch(new ClassMetadataLoadedEvent($classMetadata));
}

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/Factory/MetadataFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ public function get_metadata_for_should_dispatch_loaded_event()
$eventDispatcher->dispatch(
Argument::that(static function ($arg) use ($that) {
return $arg instanceof ClassMetadataLoadedEvent && $arg->getMetadata()->getName() === \get_class($that);
}),
'kcs_metadata.metadata_loaded'
})
)
->shouldBeCalled();
$eventDispatcher->addMethodProphecy($eventDispatcher->dispatch(Argument::cetera()));
Expand Down

0 comments on commit 564e193

Please sign in to comment.