Wer gern die aktuellste PHP Version nutzt wird die oben genannte Version mit Sicherheit kennen. Um das Problem bis zum nächsten Update zu beheben, geht in die Datei vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadata.php und ändert den Code wie folgt ab:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/** * Creates a new instance of the mapped class, without invoking the constructor. * * @return object */ public function newInstance() { if ($this->_prototype === null) { if (PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513 || PHP_VERSION_ID === 50600) { $this->_prototype = $this->reflClass->newInstanceWithoutConstructor(); } else { $this->_prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name)); } } return clone $this->_prototype; } |