bug #26393 [DI] Skip resource tracking if disabled (chalasr)
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
-------
0b748fac95
[DI] Skip resource tracking if disabled
This commit is contained in:
commit
fc1b1dd0ed
@ -346,9 +346,11 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user