Skip to content

Commit c403706

Browse files
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 ------- e25c595 [DI] fix related to preloading
2 parents 541f80c + e25c595 commit c403706

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ private function getAutoloadFile(): ?string
20472047

20482048
foreach (get_declared_classes() as $class) {
20492049
if (0 === strpos($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) {
2050-
$file = (new \ReflectionClass($class))->getFileName();
2050+
$file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php';
20512051

20522052
if (preg_match($this->targetDirRegex.'A', $file)) {
20532053
return $file;

src/Symfony/Component/DependencyInjection/ExpressionLanguage.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
use Psr\Cache\CacheItemPoolInterface;
1515
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
1616

17+
if (!class_exists(BaseExpressionLanguage::class)) {
18+
throw new \ReflectionException(BaseExpressionLanguage::class.' not found.');
19+
}
20+
1721
/**
1822
* Adds some function to the default ExpressionLanguage.
1923
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy