]> Raphaƫl G. Git Repositories - airbundle/blobdiff - DataFixtures/AirFixtures.php
Replace dropped calls with checker, factory and security replacements
[airbundle] / DataFixtures / AirFixtures.php
index 7b3e3a3596325d2d0ce8dd516e2949a55344fbb5..18fda1b568be2e86b4ffbdde8b4342749ea03fd9 100644 (file)
@@ -4,7 +4,6 @@ namespace Rapsys\AirBundle\DataFixtures;
 
 use Doctrine\Bundle\FixturesBundle\Fixture;
 use Doctrine\Persistence\ObjectManager;
 
 use Doctrine\Bundle\FixturesBundle\Fixture;
 use Doctrine\Persistence\ObjectManager;
-use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
 
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
 
@@ -14,20 +13,11 @@ use Rapsys\AirBundle\Entity\User;
 use Rapsys\AirBundle\Entity\Location;
 use Rapsys\AirBundle\Entity\Slot;
 
 use Rapsys\AirBundle\Entity\Location;
 use Rapsys\AirBundle\Entity\Slot;
 
-class AirFixtures extends Fixture implements ContainerAwareInterface {
+class AirFixtures extends Fixture {
        /**
        /**
-        * @var ContainerInterface
+        * Air fixtures constructor
         */
         */
-       private $container;
-
-       /**
-        * @var UserPasswordHasherInterface
-        */
-       private $hasher;
-
-       public function setContainer(ContainerInterface $container = null) {
-               $this->container = $container;
-               $this->hasher = $this->container->get('security.password_hasher_factory');
+       public function __construct(protected ContainerInterface $container, protected UserPasswordHasherInterface $hasher) {
        }
 
        /**
        }
 
        /**