Skip to content

Commit 460aa9f

Browse files
[DI] fix related to preloading
1 parent a0b1c7b commit 460aa9f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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;

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)