1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 17:12:51 +00:00

Fix addressability of branches containing # characters (#12042)

Fixes #12029
This commit is contained in:
Jordi Boggiano 2024-07-25 16:46:57 +02:00 committed by GitHub
parent 7504685a2e
commit eeff1c79ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 58 additions and 1 deletions

View file

@ -94,6 +94,9 @@ class VcsRepositoryTest extends TestCase
$exec('git add foo');
$exec('git commit -m change-a');
// add foo#bar branch which should result in dev-foo+bar
$exec('git branch foo#bar');
// add version to composer.json
$exec('git checkout master');
$composer['version'] = '1.0.0';
@ -154,6 +157,7 @@ class VcsRepositoryTest extends TestCase
'1.1.x-dev' => true,
'dev-feature-b' => true,
'dev-feature/a-1.0-B' => true,
'dev-foo+bar' => true,
'dev-master' => true,
'9999999-dev' => true, // alias of dev-master
];