mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 16:45:01 +00:00
Remove ContainerAwareInterface and extend Fixture instead
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DataFixtures\ORM;
|
||||
|
||||
use Chill\MainBundle\Entity\Language;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
@@ -21,14 +22,12 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
/**
|
||||
* Load languages into database.
|
||||
*/
|
||||
class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
class LoadLanguages extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
// Array of ancien languages (to exclude)
|
||||
private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
|
||||
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
// The regional version of language are language with _ in the code
|
||||
// This array contains regional code to not exclude
|
||||
private array $regionalVersionToInclude = ['ro_MD'];
|
||||
@@ -57,11 +56,6 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(?ContainerInterface $container = null): void
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare names for languages.
|
||||
*
|
||||
|
Reference in New Issue
Block a user