diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php index 78d8f886b..24514c70a 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php @@ -21,11 +21,13 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\Person; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\Persistence\ObjectManager; use RuntimeException; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Contracts\Translation\TranslatorInterface; +use Twig\Environment; class LoadCustomFields extends AbstractFixture implements ContainerAwareInterface, @@ -78,7 +80,7 @@ class LoadCustomFields extends AbstractFixture implements private function createCustomFieldChoice() { return new CustomFieldChoice( - $this->container->get('templating'), + $this->container->get(Environment::class), $this->translatableStringHelper ); } @@ -86,14 +88,14 @@ class LoadCustomFields extends AbstractFixture implements private function createCustomFieldText() { return new CustomFieldText( - $this->container->get('templating'), + $this->container->get(Environment::class), $this->translatableStringHelper ); } private function loadData(ObjectManager $manager) { - $personIds = $this->container->get('doctrine.orm.entity_manager') + $personIds = $this->container->get(EntityManagerInterface::class) ->createQuery('SELECT person.id FROM ChillPersonBundle:Person person') ->getScalarResult();