Skip to content

Commit

Permalink
Merge pull request #9 from TomHAnderson/hotfix/service-manager-3
Browse files Browse the repository at this point in the history
Removed getServiceLocator from fixtures
  • Loading branch information
TomHAnderson authored Jul 28, 2018
2 parents f1b28d6 + 11ef98e commit fff09b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Fixture/RevisionEntityFixtureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class RevisionEntityFixtureFactory implements
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$config = $container->getServiceLocator()->get('config')['zf-doctrine-audit'];
$config = $container->get('config')['zf-doctrine-audit'];

$instance = new $requestedName();

$instance->setEntityConfigCollection(new ArrayCollection($config['entities']));
$instance->setObjectManager($container->getServiceLocator()->get($config['target_object_manager']));
$instance->setObjectManager($container->get($config['target_object_manager']));

return $instance;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Fixture/RevisionJoinEntityFixtureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class RevisionJoinEntityFixtureFactory implements
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$config = $container->getServiceLocator()->get('config')['zf-doctrine-audit'];
$config = $container->get('config')['zf-doctrine-audit'];

$instance = new $requestedName();

$instance->setJoinEntityConfigCollection(new ArrayCollection($config['joinEntities']));
$instance->setObjectManager($container->getServiceLocator()->get($config['target_object_manager']));
$instance->setObjectManager($container->get($config['target_object_manager']));

return $instance;
}
Expand Down

0 comments on commit fff09b2

Please sign in to comment.