Skip to content

Commit

Permalink
Don't use reflection if class is final + internal ancestors
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranmcnulty committed Jun 13, 2015
1 parent d433578 commit 6e8cfc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Instantiator/Instantiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private function attemptInstantiationViaUnSerialization(ReflectionClass $reflect
private function isInstantiableViaReflection(ReflectionClass $reflectionClass)
{
if (\PHP_VERSION_ID >= 50600) {
return ! ($reflectionClass->isInternal() && $reflectionClass->isFinal());
return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal());
}

return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass);
Expand Down

0 comments on commit 6e8cfc5

Please sign in to comment.