Merge branch '1.10'
commit
7ea6d5d2e7
|
@ -69,6 +69,10 @@
|
||||||
* Fixed suggest output being very spammy, it now is only one line long and shows more rarely
|
* Fixed suggest output being very spammy, it now is only one line long and shows more rarely
|
||||||
* Fixed conflict rules like e.g. >=5 from matching dev-master, as it is not normalized to 9999999-dev internally anymore
|
* Fixed conflict rules like e.g. >=5 from matching dev-master, as it is not normalized to 9999999-dev internally anymore
|
||||||
|
|
||||||
|
### [1.10.15] 2020-10-13
|
||||||
|
|
||||||
|
* Fixed path repo version guessing issue
|
||||||
|
|
||||||
### [1.10.14] 2020-10-13
|
### [1.10.14] 2020-10-13
|
||||||
|
|
||||||
* Fixed version guesser to look at remote branches as well as local ones
|
* Fixed version guesser to look at remote branches as well as local ones
|
||||||
|
@ -976,6 +980,7 @@
|
||||||
[2.0.0-alpha3]: https://github.com/composer/composer/compare/2.0.0-alpha2...2.0.0-alpha3
|
[2.0.0-alpha3]: https://github.com/composer/composer/compare/2.0.0-alpha2...2.0.0-alpha3
|
||||||
[2.0.0-alpha2]: https://github.com/composer/composer/compare/2.0.0-alpha1...2.0.0-alpha2
|
[2.0.0-alpha2]: https://github.com/composer/composer/compare/2.0.0-alpha1...2.0.0-alpha2
|
||||||
[2.0.0-alpha1]: https://github.com/composer/composer/compare/1.10.7...2.0.0-alpha1
|
[2.0.0-alpha1]: https://github.com/composer/composer/compare/1.10.7...2.0.0-alpha1
|
||||||
|
[1.10.15]: https://github.com/composer/composer/compare/1.10.14...1.10.15
|
||||||
[1.10.14]: https://github.com/composer/composer/compare/1.10.13...1.10.14
|
[1.10.14]: https://github.com/composer/composer/compare/1.10.13...1.10.14
|
||||||
[1.10.13]: https://github.com/composer/composer/compare/1.10.12...1.10.13
|
[1.10.13]: https://github.com/composer/composer/compare/1.10.12...1.10.13
|
||||||
[1.10.12]: https://github.com/composer/composer/compare/1.10.11...1.10.12
|
[1.10.12]: https://github.com/composer/composer/compare/1.10.11...1.10.12
|
||||||
|
|
|
@ -74,7 +74,7 @@ class RootPackageLoader extends ArrayLoader
|
||||||
$commit = null;
|
$commit = null;
|
||||||
|
|
||||||
if (isset($config['extra']['branch-version'])) {
|
if (isset($config['extra']['branch-version'])) {
|
||||||
$config['version'] = preg_replace('{(\.x)?(-dev)?$}', '.x-dev', $config['extra']['branch-version']);
|
$config['version'] = preg_replace('{(\.x)?(-dev)?$}', '', $config['extra']['branch-version']).'.x-dev';
|
||||||
} elseif (getenv('COMPOSER_ROOT_VERSION')) {
|
} elseif (getenv('COMPOSER_ROOT_VERSION')) {
|
||||||
// override with env var if available
|
// override with env var if available
|
||||||
$config['version'] = getenv('COMPOSER_ROOT_VERSION');
|
$config['version'] = getenv('COMPOSER_ROOT_VERSION');
|
||||||
|
|
|
@ -173,7 +173,7 @@ class PathRepository extends ArrayRepository implements ConfigurableRepositoryIn
|
||||||
|
|
||||||
// use the branch-version as the package version if available
|
// use the branch-version as the package version if available
|
||||||
if (!isset($package['version']) && isset($package['extra']['branch-version'])) {
|
if (!isset($package['version']) && isset($package['extra']['branch-version'])) {
|
||||||
$package['version'] = preg_replace('{(\.x)?(-dev)?$}', '.x-dev', $package['extra']['branch-version']);
|
$package['version'] = preg_replace('{(\.x)?(-dev)?$}', '', $package['extra']['branch-version']).'.x-dev';
|
||||||
}
|
}
|
||||||
|
|
||||||
// carry over the root package version if this path repo is in the same git repository as root package
|
// carry over the root package version if this path repo is in the same git repository as root package
|
||||||
|
|
|
@ -202,14 +202,27 @@ class RootPackageLoaderTest extends TestCase
|
||||||
$this->assertEquals("dev-latest-production", $package->getPrettyVersion());
|
$this->assertEquals("dev-latest-production", $package->getPrettyVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLoadExtraBranchVersion()
|
/**
|
||||||
|
* @dataProvider provideExtraBranchVersion
|
||||||
|
*/
|
||||||
|
public function testLoadExtraBranchVersion($branchVersion)
|
||||||
{
|
{
|
||||||
$package = $this->loadPackage(array(
|
$package = $this->loadPackage(array(
|
||||||
'extra' => array(
|
'extra' => array(
|
||||||
'branch-version' => '1.2',
|
'branch-version' => $branchVersion,
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertEquals('1.2.x-dev', $package->getPrettyVersion());
|
$this->assertEquals('1.2.x-dev', $package->getPrettyVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function provideExtraBranchVersion()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('1.2'),
|
||||||
|
array('1.2.x'),
|
||||||
|
array('1.2-dev'),
|
||||||
|
array('1.2.x-dev'),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue