Skip to content

Commit

Permalink
bug #26393 [DI] Skip resource tracking if disabled (chalasr)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

 [DI] Skip resource tracking if disabled

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26388
| License       | MIT
| Doc PR        | n/a

Commits
-------

0b748fa [DI] Skip resource tracking if disabled
  • Loading branch information
fabpot committed Mar 5, 2018
2 parents cfb243e + 0b748fa commit fc1b1dd
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 fc1b1dd

Please sign in to comment.