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
This commit is contained in:
commit
fa8455aba6
@ -326,9 +326,11 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
try {
|
try {
|
||||||
if (isset($this->classReflectors[$class])) {
|
if (isset($this->classReflectors[$class])) {
|
||||||
$classReflector = $this->classReflectors[$class];
|
$classReflector = $this->classReflectors[$class];
|
||||||
} else {
|
} elseif ($this->trackResources) {
|
||||||
$resource = new ClassExistenceResource($class, false);
|
$resource = new ClassExistenceResource($class, false);
|
||||||
$classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
|
$classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
|
||||||
|
} else {
|
||||||
|
$classReflector = new \ReflectionClass($class);
|
||||||
}
|
}
|
||||||
} catch (\ReflectionException $e) {
|
} catch (\ReflectionException $e) {
|
||||||
if ($throw) {
|
if ($throw) {
|
||||||
|
@ -297,6 +297,10 @@ class Finder implements \IteratorAggregate, \Countable
|
|||||||
/**
|
/**
|
||||||
* Excludes directories.
|
* Excludes directories.
|
||||||
*
|
*
|
||||||
|
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
|
||||||
|
*
|
||||||
|
* $finder->in(__DIR__)->exclude('ruby');
|
||||||
|
*
|
||||||
* @param string|array $dirs A directory path or an array of directories
|
* @param string|array $dirs A directory path or an array of directories
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
|
Reference in New Issue
Block a user