Skip to content

Commit fa8455a

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: Improve the documentation of `Finder::exclude()` [DI] Skip resource tracking if disabled [WebProfilerBundle] fix wrong variable for profiler counting ajax requests
2 parents 1819c8d + ab07cdd commit fa8455a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,11 @@ public function getReflectionClass(?string $class, bool $throw = true): ?\Reflec
326326
try {
327327
if (isset($this->classReflectors[$class])) {
328328
$classReflector = $this->classReflectors[$class];
329-
} else {
329+
} elseif ($this->trackResources) {
330330
$resource = new ClassExistenceResource($class, false);
331331
$classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
332+
} else {
333+
$classReflector = new \ReflectionClass($class);
332334
}
333335
} catch (\ReflectionException $e) {
334336
if ($throw) {

src/Symfony/Component/Finder/Finder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ public function size($size)
297297
/**
298298
* Excludes directories.
299299
*
300+
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
301+
*
302+
* $finder->in(__DIR__)->exclude('ruby');
303+
*
300304
* @param string|array $dirs A directory path or an array of directories
301305
*
302306
* @return $this

0 commit comments

Comments
 (0)