Skip to content

Commit 3a2be08

Browse files
committed
bug #12784 [DependencyInjection] make paths relative to __DIR__ in the generated container (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [DependencyInjection] make paths relative to __DIR__ in the generated container | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #6484, #3079, partially #9238, #10894, #10999 | License | MIT | Doc PR | n/a This is an alternative approach to #10999 for removing absolute paths from the generated container: instead of trying to fix the container file after it has been dumped, telling to the PhpDumper where its output will be written allows it to replace parts of strings by an equivalent value based on `__DIR__`. This should be safe, thus the PR is on 2.3. Commits ------- edd7057 [DependencyInjection] make paths relative to __DIR__ in the generated container
2 parents 8a57ab8 + 3d9b54a commit 3a2be08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
710710
$dumper->setProxyDumper(new ProxyDumper());
711711
}
712712

713-
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass));
713+
$content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass, 'file' => (string) $cache));
714714
if (!$this->debug) {
715715
$content = static::stripComments($content);
716716
}

0 commit comments

Comments
 (0)