From 2da8d886cc5e583e3fdf3dbde36057c8a0a4ccf9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 2 Feb 2022 17:24:50 +0100 Subject: [PATCH] Make code a bit more robust --- src/Composer/Repository/PathRepository.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Composer/Repository/PathRepository.php b/src/Composer/Repository/PathRepository.php index 3cb879c5c..d2a81cee7 100644 --- a/src/Composer/Repository/PathRepository.php +++ b/src/Composer/Repository/PathRepository.php @@ -173,8 +173,9 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn 'url' => $url, 'reference' => sha1($json . serialize($this->options)), ); - $package['transport-options'] = $this->options; - unset($package['transport-options']['versions']); + + // copy symlink/relative options to transport options + $package['transport-options'] = array_intersect_key($this->options, array('symlink' => true, 'relative' => true)); // use the version provided as option if available if (isset($package['name'], $this->options['versions'][$package['name']])) {