1
0
Fork 0

Fix bump-after-update when passing inline constraints, fixes #12223

pull/12230/head
Jordi Boggiano 2024-12-09 14:25:32 +01:00
parent 666dc93fcc
commit bbab31b564
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View File

@ -153,6 +153,10 @@ EOT
} }
if (count($packagesFilter) > 0) { if (count($packagesFilter) > 0) {
// support proxied args from the update command that contain constraints together with the package names
$packagesFilter = array_map(function ($constraint) {
return Preg::replace('{[:= ].+}', '', $constraint);
}, $packagesFilter);
$pattern = BasePackage::packageNamesToRegexp(array_unique(array_map('strtolower', $packagesFilter))); $pattern = BasePackage::packageNamesToRegexp(array_unique(array_map('strtolower', $packagesFilter)));
foreach ($tasks as $key => $reqs) { foreach ($tasks as $key => $reqs) {
foreach ($reqs as $pkgName => $link) { foreach ($reqs as $pkgName => $link) {

View File

@ -149,7 +149,7 @@ class BumpCommandTest extends TestCase
'dev/pkg' => '~2.0', 'dev/pkg' => '~2.0',
], ],
], ],
['packages' => ['first/pkg', 'dev/*']], ['packages' => ['first/pkg:3.0.1', 'dev/*']],
[ [
'require' => [ 'require' => [
'first/pkg' => '^2.3.4', 'first/pkg' => '^2.3.4',