Skip to content

Commit 2efeb8c

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: [Filesystem] remove unused makeRelative example
2 parents e67f221 + 41bf609 commit 2efeb8c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

components/filesystem.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Especially when storing many paths, the amount of duplicated information is
426426
noticeable. You can use :method:`Symfony\\Component\\Filesystem\\Path::getLongestCommonBasePath`
427427
to check a list of paths for a common base path::
428428

429-
Path::getLongestCommonBasePath(
429+
$basePath = Path::getLongestCommonBasePath(
430430
'/var/www/vhosts/project/httpdocs/config/config.yaml',
431431
'/var/www/vhosts/project/httpdocs/config/routing.yaml',
432432
'/var/www/vhosts/project/httpdocs/config/services.yaml',
@@ -435,17 +435,14 @@ to check a list of paths for a common base path::
435435
);
436436
// => /var/www/vhosts/project/httpdocs
437437

438-
Use this path together with :method:`Symfony\\Component\\Filesystem\\Path::makeRelative`
439-
to shorten the stored paths::
440-
441-
$bp = '/var/www/vhosts/project/httpdocs';
438+
Use this common base path to shorten the stored paths::
442439

443440
return [
444-
$bp.'/config/config.yaml',
445-
$bp.'/config/routing.yaml',
446-
$bp.'/config/services.yaml',
447-
$bp.'/images/banana.gif',
448-
$bp.'/uploads/images/nicer-banana.gif',
441+
$basePath.'/config/config.yaml',
442+
$basePath.'/config/routing.yaml',
443+
$basePath.'/config/services.yaml',
444+
$basePath.'/images/banana.gif',
445+
$basePath.'/uploads/images/nicer-banana.gif',
449446
];
450447

451448
:method:`Symfony\\Component\\Filesystem\\Path::getLongestCommonBasePath` always

0 commit comments

Comments
 (0)