mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Handle "versions" option in PathRepository, remove support for "branch-version"
This commit is contained in:
parent
079e501ac8
commit
725b33ee5a
3 changed files with 57 additions and 0 deletions
|
@ -164,6 +164,12 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
|||
'reference' => sha1($json . serialize($this->options)),
|
||||
);
|
||||
$package['transport-options'] = $this->options;
|
||||
unset($package['transport-options']['versions']);
|
||||
|
||||
// use the version provided as option if available
|
||||
if (isset($package['name'], $this->options['versions'][$package['name']])) {
|
||||
$package['version'] = $this->options['versions'][$package['name']];
|
||||
}
|
||||
|
||||
// carry over the root package version if this path repo is in the same git repository as root package
|
||||
if (!isset($package['version']) && ($rootVersion = getenv('COMPOSER_ROOT_VERSION'))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue