bug #33539 [DI] fix related to preloading (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] fix related to preloading
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
e25c5957e0
[DI] fix related to preloading
This commit is contained in:
commit
c403706167
@ -2047,7 +2047,7 @@ EOF;
|
|||||||
|
|
||||||
foreach (get_declared_classes() as $class) {
|
foreach (get_declared_classes() as $class) {
|
||||||
if (0 === strpos($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) {
|
if (0 === strpos($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) {
|
||||||
$file = (new \ReflectionClass($class))->getFileName();
|
$file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php';
|
||||||
|
|
||||||
if (preg_match($this->targetDirRegex.'A', $file)) {
|
if (preg_match($this->targetDirRegex.'A', $file)) {
|
||||||
return $file;
|
return $file;
|
||||||
|
@ -14,6 +14,10 @@ namespace Symfony\Component\DependencyInjection;
|
|||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
|
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
|
||||||
|
|
||||||
|
if (!class_exists(BaseExpressionLanguage::class)) {
|
||||||
|
throw new \ReflectionException(BaseExpressionLanguage::class.' not found.');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds some function to the default ExpressionLanguage.
|
* Adds some function to the default ExpressionLanguage.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user