mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
DX: add default autoconfigure and autowiring on Reports/Fixtures
This commit is contained in:
@@ -19,6 +19,7 @@ use Chill\ReportBundle\Entity\Report;
|
||||
use DateTime;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Faker\Factory as FakerFactory;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
@@ -29,14 +30,13 @@ use function in_array;
|
||||
/**
|
||||
* Load reports into DB.
|
||||
*/
|
||||
class LoadReports extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
final class LoadReports extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
|
||||
|
||||
private readonly \Faker\Generator $faker;
|
||||
|
||||
public function __construct(private readonly \Doctrine\ORM\EntityManager $entityManager)
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager
|
||||
) {
|
||||
$this->faker = FakerFactory::create('fr_FR');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user