@@ -435,7 +435,7 @@ Especially when storing many paths, the amount of duplicated information is
435
435
noticeable. You can use :method: `Symfony\\ Component\\ Filesystem\\ Path::getLongestCommonBasePath `
436
436
to check a list of paths for a common base path::
437
437
438
- Path::getLongestCommonBasePath(
438
+ $basePath = Path::getLongestCommonBasePath(
439
439
'/var/www/vhosts/project/httpdocs/config/config.yaml',
440
440
'/var/www/vhosts/project/httpdocs/config/routing.yaml',
441
441
'/var/www/vhosts/project/httpdocs/config/services.yaml',
@@ -444,17 +444,14 @@ to check a list of paths for a common base path::
444
444
);
445
445
// => /var/www/vhosts/project/httpdocs
446
446
447
- Use this path together with :method: `Symfony\\ Component\\ Filesystem\\ Path::makeRelative `
448
- to shorten the stored paths::
449
-
450
- $bp = '/var/www/vhosts/project/httpdocs';
447
+ Use this path together to shorten the stored paths::
451
448
452
449
return [
453
- $bp .'/config/config.yaml',
454
- $bp .'/config/routing.yaml',
455
- $bp .'/config/services.yaml',
456
- $bp .'/images/banana.gif',
457
- $bp .'/uploads/images/nicer-banana.gif',
450
+ $basePath .'/config/config.yaml',
451
+ $basePath .'/config/routing.yaml',
452
+ $basePath .'/config/services.yaml',
453
+ $basePath .'/images/banana.gif',
454
+ $basePath .'/uploads/images/nicer-banana.gif',
458
455
];
459
456
460
457
:method: `Symfony\\ Component\\ Filesystem\\ Path::getLongestCommonBasePath ` always
0 commit comments