1ce6357c1d
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [ ] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/7 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
28 lines
565 B
PHP
28 lines
565 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\DataFixtures;
|
|
|
|
use App\Entity\User;
|
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
|
use Doctrine\Persistence\ObjectManager;
|
|
|
|
class UserFixtures extends Fixture
|
|
{
|
|
public function load(ObjectManager $manager): void
|
|
{
|
|
$admin = new User()
|
|
->setUsername('admin')
|
|
->setRoles(['ROLE_ADMIN'])
|
|
;
|
|
|
|
$admin->setPassword(
|
|
'$2y$13$ZuB4LRD1i5Arc34CEO54FeUyQaIf3jamLf6caFK9v8TBMA5RcmIke'
|
|
);
|
|
|
|
$manager->persist($admin);
|
|
$manager->flush();
|
|
}
|
|
}
|