mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
ArrayLoader: fix integer index of branch alias (#10660)
This commit is contained in:
parent
1fff47bfc7
commit
9f8ee0e40a
2 changed files with 21 additions and 0 deletions
|
@ -347,4 +347,23 @@ class ArrayLoaderTest extends TestCase
|
|||
$this->assertSame('2019', $package->getSourceReference());
|
||||
$this->assertSame('2019', $package->getDistReference());
|
||||
}
|
||||
|
||||
public function testBranchAliasIntegerIndex(): void
|
||||
{
|
||||
$config = array(
|
||||
'name' => 'acme/package',
|
||||
'version' => 'dev-1',
|
||||
'extra' => [
|
||||
'branch-alias' => [
|
||||
'1' => '1.3-dev',
|
||||
],
|
||||
],
|
||||
'dist' => [
|
||||
'type' => 'zip',
|
||||
'url' => 'https://example.org/',
|
||||
],
|
||||
);
|
||||
|
||||
$this->assertNull($this->loader->getBranchAlias($config));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue