Skip to content

Commit 44dd197

Browse files
committed
Fix preload file
1 parent bfe697b commit 44dd197

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public function dump(array $options = [])
303303
$this->asFiles = false;
304304

305305
if ($preload && null !== $autoloadFile = $this->getAutoloadFile()) {
306-
$autoloadFile = substr($this->export($autoloadFile), 2, -1);
306+
$autoloadFile = $this->export($autoloadFile);
307307

308308
$code[$options['class'].'.preload.php'] = <<<EOF
309309
<?php
@@ -2048,11 +2048,7 @@ private function getAutoloadFile(): ?string
20482048

20492049
foreach (get_declared_classes() as $class) {
20502050
if (0 === strpos($class, 'ComposerAutoloaderInit') && $class::getLoader() === $autoloader[0]) {
2051-
$file = \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php';
2052-
2053-
if (preg_match($this->targetDirRegex.'A', $file)) {
2054-
return $file;
2055-
}
2051+
return \dirname((new \ReflectionClass($class))->getFileName(), 2).'/autoload.php';
20562052
}
20572053
}
20582054
}

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