Skip to content

Commit ad9ddd2

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Update filesystem.rst
2 parents 03fc231 + ac29914 commit ad9ddd2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

components/filesystem.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,15 +426,13 @@ 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-
$paths = [
429+
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',
433433
'/var/www/vhosts/project/httpdocs/images/banana.gif',
434-
'/var/www/vhosts/project/httpdocs/uploads/images/nicer-banana.gif',
435-
];
436-
437-
Path::getLongestCommonBasePath($paths);
434+
'/var/www/vhosts/project/httpdocs/uploads/images/nicer-banana.gif'
435+
);
438436
// => /var/www/vhosts/project/httpdocs
439437

440438
Use this path together with :method:`Symfony\\Component\\Filesystem\\Path::makeRelative`

0 commit comments

Comments
 (0)