1
0
Fork 0

Merge pull request #12266 from Seldaek/copy_src_to_dist_ref

Copy source ref to dist ref if a custom dist info is present in non-dist-supporting drivers
pull/12292/head
Jordi Boggiano 2025-01-21 14:41:35 +01:00 committed by GitHub
commit 30e5825c68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -443,6 +443,11 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
$data['source'] = $driver->getSource($identifier);
}
// if custom dist info is provided but does not provide a reference, copy the source reference to it
if (is_array($data['dist']) && !isset($data['dist']['reference']) && isset($data['source']['reference'])) {
$data['dist']['reference'] = $data['source']['reference'];
}
return $data;
}