Skip to content

Commit

Permalink
[DI] Skip resource tracking if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Chalas committed Mar 4, 2018
1 parent cfb243e commit 0b748fa
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -346,9 +346,11 @@ public function getReflectionClass($class, $throw = true)
try {
if (isset($this->classReflectors[$class])) {
$classReflector = $this->classReflectors[$class];
} else {
} elseif ($this->trackResources) {
$resource = new ClassExistenceResource($class, false);
$classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
} else {
$classReflector = new \ReflectionClass($class);
}
} catch (\ReflectionException $e) {
if ($throw) {
Expand Down

0 comments on commit 0b748fa

Please sign in to comment.