mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Add support for "extra.branch-version"
This commit is contained in:
parent
2c6a9aba32
commit
893fbfcb89
6 changed files with 59 additions and 4 deletions
|
@ -165,6 +165,11 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
|||
);
|
||||
$package['transport-options'] = $this->options;
|
||||
|
||||
// use the branch-version as the package version if available
|
||||
if (!isset($package['version']) && isset($package['extra']['branch-version'])) {
|
||||
$package['version'] = preg_replace('{(\.x)?(-dev)?$}', '.x-dev', $package['extra']['branch-version']);
|
||||
}
|
||||
|
||||
// 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'))) {
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue