You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!$this->isAbsolutePath($endPath) || !$this->isAbsolutePath($startPath)) {
450
+
@trigger_error(sprintf('Support for passing relative paths to %s() is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
451
+
}
452
+
449
453
// Normalize separators on Windows
450
454
if ('\\' === DIRECTORY_SEPARATOR) {
451
455
$endPath = str_replace('\\', '/', $endPath);
@@ -488,7 +492,7 @@ public function makePathRelative($endPath, $startPath)
488
492
}
489
493
490
494
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
491
-
if (count($startPathArr) === 1 && $startPathArr[0] === '') {
495
+
if (1 === count($startPathArr) && ''=== $startPathArr[0]) {
492
496
$depth = 0;
493
497
} else {
494
498
$depth = count($startPathArr) - $index;
@@ -594,7 +598,7 @@ public function isAbsolutePath($file)
@@ -1145,6 +1144,15 @@ public function providePathsForMakePathRelative()
1145
1144
return$paths;
1146
1145
}
1147
1146
1147
+
/**
1148
+
* @group legacy
1149
+
* @expectedDeprecation Support for passing relative paths to Symfony\Component\Filesystem\Filesystem::makePathRelative() is deprecated since version 3.4 and will be removed in 4.0.
0 commit comments