fix : corrections doublon fixture
This commit is contained in:
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\DataFixtures;
|
|
||||||
|
|
||||||
use App\Entity\Address;
|
|
||||||
use App\Entity\Supplier;
|
|
||||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
|
||||||
use Doctrine\Persistence\ObjectManager;
|
|
||||||
|
|
||||||
class SupplierFixtures extends Fixture
|
|
||||||
{
|
|
||||||
public function load(ObjectManager $manager): void
|
|
||||||
{
|
|
||||||
$address = new Address()
|
|
||||||
->setLabel('LIOT CHATELLERAULT')
|
|
||||||
->setStreet("14 Allée d'Argenson")
|
|
||||||
->setStreet2('ZI Nord')
|
|
||||||
->setPostalCode('86100')
|
|
||||||
->setCity('CHATELLERAULT')
|
|
||||||
->setCountryCode('FR')
|
|
||||||
;
|
|
||||||
|
|
||||||
$supplier = new Supplier()
|
|
||||||
->setName('LIOT')
|
|
||||||
->setEmail('lpc.contacts@lpc-liot.fr')
|
|
||||||
->setPhone('05.49.20.09.10')
|
|
||||||
;
|
|
||||||
|
|
||||||
$supplier->getAddresses()->add($address);
|
|
||||||
|
|
||||||
$manager->persist($address);
|
|
||||||
$manager->persist($supplier);
|
|
||||||
|
|
||||||
$manager->flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user