Skip to content

Commit 4169e62

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: [Validator] Allow underscore character "_" in URL username and password [SecurityBundle] Passwords are not encoded when algorithm set to \"true\" do not validate passwords when the hash is null [DI] Fix making the container path-independent when the app is in /app Allow copy instead of symlink for ./link script [FrameworkBundle] resolve service locators in `debug:*` commands bumped Symfony version to 3.4.37 updated VERSION for 3.4.36 update CONTRIBUTORS for 3.4.36 updated CHANGELOG for 3.4.36
2 parents 8e30245 + e138c08 commit 4169e62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dumper/PhpDumper.php

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

199199
$dir = explode(\DIRECTORY_SEPARATOR, realpath($dir));
200200
$i = \count($dir);
201201

202-
if (3 <= $i) {
202+
if (2 + (int) ('\\' === \DIRECTORY_SEPARATOR) <= $i) {
203203
$regex = '';
204-
$lastOptionalDir = $i > 8 ? $i - 5 : 3;
204+
$lastOptionalDir = $i > 8 ? $i - 5 : (2 + (int) ('\\' === \DIRECTORY_SEPARATOR));
205205
$this->targetDirMaxMatches = $i - $lastOptionalDir;
206206

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

0 commit comments

Comments
 (0)