Skip to content

Commit c6f46c3

Browse files
[DI] Fix making the container path-independent when the app is in /app
1 parent 7a13ea3 commit c6f46c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ public function dump(array $options = [])
173173
if (!empty($options['file']) && is_dir($dir = \dirname($options['file']))) {
174174
// Build a regexp where the first root dirs are mandatory,
175175
// but every other sub-dir is optional up to the full path in $dir
176-
// Mandate at least 2 root dirs and not more that 5 optional dirs.
176+
// Mandate at least 1 root dir and not more than 5 optional dirs.
177177

178178
$dir = explode(\DIRECTORY_SEPARATOR, realpath($dir));
179179
$i = \count($dir);
180180

181-
if (3 <= $i) {
181+
if (2 <= $i) {
182182
$regex = '';
183-
$lastOptionalDir = $i > 8 ? $i - 5 : 3;
183+
$lastOptionalDir = $i > 8 ? $i - 5 : 2;
184184
$this->targetDirMaxMatches = $i - $lastOptionalDir;
185185

186186
while (--$i >= $lastOptionalDir) {

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