Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 61143fb

Browse files
committed
Fix big reflection bug in AbstractFixture
1 parent c4f9836 commit 61143fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

AbstractFixture.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ abstract class AbstractFixture extends BaseAbstractFixture implements OrderedFix
4949
/** @var bool */
5050
private $clearEMOnFlush;
5151

52+
/** @var ReflectionClass|null */
53+
private $reflection;
54+
5255
/** @var Instantiator|null */
5356
private static $instantiator;
5457

55-
/** @var ReflectionClass|null */
56-
private static $reflection;
57-
5858
public function __construct()
5959
{
6060
$this->clearEMOnFlush = $this->clearEntityManagerOnFlush();
@@ -257,11 +257,11 @@ protected function createNewInstance(array $data): object
257257

258258
private function getReflection(): ReflectionClass
259259
{
260-
if (!self::$reflection) {
261-
return self::$reflection = new ReflectionClass($this->getEntityClass());
260+
if (!$this->reflection) {
261+
return $this->reflection = new ReflectionClass($this->getEntityClass());
262262
}
263263

264-
return self::$reflection;
264+
return $this->reflection;
265265
}
266266

267267
private static function getInstantiator(): Instantiator

0 commit comments

Comments
 (0)