Pass class as second parameter to getReference() fixture method

This commit is contained in:
2024-11-28 13:28:52 +01:00
parent 19e6ceba28
commit f820273dd7
27 changed files with 94 additions and 59 deletions

View File

@@ -365,7 +365,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
$manager->persist($c);
$ref = 'postal_code_'.$code[0];
if (!$this->hasReference($ref, null)) {
if (!$this->hasReference($ref, PostalCode::class)) {
$this->addReference($ref, $c);
self::$refs[] = $ref;
}