diff --git a/lib/Doctrine/Common/Reflection/StaticReflectionClass.php b/lib/Doctrine/Common/Reflection/StaticReflectionClass.php index 2d0f5b007..9d650ec75 100644 --- a/lib/Doctrine/Common/Reflection/StaticReflectionClass.php +++ b/lib/Doctrine/Common/Reflection/StaticReflectionClass.php @@ -394,7 +394,7 @@ public function isUserDefined() /** * {@inheritDoc} */ - public function newInstance($args) + public function newInstance($arg = null, ...$args) { throw new ReflectionException('Method not implemented'); } diff --git a/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php b/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php index 743971d36..223dccaa6 100644 --- a/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php +++ b/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php @@ -35,6 +35,7 @@ public function testParentClass($classAnnotationOptimize, $parsedClassName, $exp $staticReflectionParser = new StaticReflectionParser($parsedClassName, new Psr0FindFile($paths), $classAnnotationOptimize); $declaringClassName = $staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', 'test')->getClassName(); self::assertEquals($expectedClassName, $declaringClassName); + self::assertEquals($parsedClassName, $staticReflectionParser->getReflectionClass()->getName()); } /**