Remove creation of AccompanyingPeriod on person creation

The data fixtures still create accompanying period for each person.
This commit is contained in:
2021-06-29 15:23:50 +02:00
parent 65198937c0
commit 692e63aba3
6 changed files with 24 additions and 49 deletions

View File

@@ -183,6 +183,14 @@ class LoadPeople extends AbstractFixture implements OrderedFixtureInterface, Con
private function addAPerson(array $person, ObjectManager $manager)
{
$p = new Person();
$p->addAccompanyingPeriod(
new AccompanyingPeriod(
(new \DateTime())
->sub(
new \DateInterval('P'.\random_int(0, 180).'D')
)
)
);
foreach ($person as $key => $value) {
switch ($key) {