1
0
Fork 0

Make code a bit more robust

pull/10512/head
Jordi Boggiano 2022-02-02 17:24:50 +01:00
parent 45bbe43aac
commit 2da8d886cc
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 2 deletions

View File

@ -173,8 +173,9 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
'url' => $url, 'url' => $url,
'reference' => sha1($json . serialize($this->options)), '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 // use the version provided as option if available
if (isset($package['name'], $this->options['versions'][$package['name']])) { if (isset($package['name'], $this->options['versions'][$package['name']])) {