container = $container; } /** * {@inheritdoc} */ public function load(ObjectManager $manager): void { $credential = new SiteCredential($this->getReference('admin-user')); $credential->setHost('.super.com'); $credential->setUsername($this->container->get(CryptoProxy::class)->crypt('.super')); $credential->setPassword($this->container->get(CryptoProxy::class)->crypt('bar')); $manager->persist($credential); $credential = new SiteCredential($this->getReference('admin-user')); $credential->setHost('paywall.example.com'); $credential->setUsername($this->container->get(CryptoProxy::class)->crypt('paywall.example')); $credential->setPassword($this->container->get(CryptoProxy::class)->crypt('bar')); $manager->persist($credential); $manager->flush(); } /** * {@inheritdoc} */ public function getDependencies() { return [ UserFixtures::class, ]; } }