1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/update-allow-list-patterns....

70 lines
2.4 KiB
Plaintext
Raw Normal View History

--TEST--
Update with a package whitelist only updates those corresponding to the pattern
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
2020-03-11 08:34:40 +00:00
{ "name": "vendor/test-package", "version": "2.0" },
{ "name": "vendor/not-me", "version": "2.0" },
{ "name": "exact/test-package", "version": "2.0" },
{ "name": "notexact/testpackage", "version": "2.0" },
{ "name": "all/package1", "version": "2.0" },
{ "name": "all/package2", "version": "2.0" },
2012-12-13 14:06:06 +00:00
{ "name": "another/another", "version": "2.0" },
{ "name": "no/regexp", "version": "2.0" }
]
}
],
"require": {
2020-03-11 08:34:40 +00:00
"vendor/test-package": "*.*",
"vendor/not-me": "*.*",
"exact/test-package": "*.*",
"notexact/testpackage": "*.*",
"all/package1": "*.*",
"all/package2": "*.*",
2012-12-13 14:06:06 +00:00
"another/another": "*.*",
"no/regexp": "*.*"
}
}
--INSTALLED--
[
2020-03-11 08:34:40 +00:00
{ "name": "vendor/test-package", "version": "1.0" },
{ "name": "vendor/not-me", "version": "1.0" },
{ "name": "exact/test-package", "version": "1.0" },
{ "name": "notexact/testpackage", "version": "1.0" },
{ "name": "all/package1", "version": "1.0" },
{ "name": "all/package2", "version": "1.0" },
2012-12-13 14:06:06 +00:00
{ "name": "another/another", "version": "1.0" },
{ "name": "no/regexp", "version": "1.0" }
]
--LOCK--
{
"packages": [
2020-03-11 08:34:40 +00:00
{ "name": "vendor/test-package", "version": "1.0" },
{ "name": "vendor/not-me", "version": "1.0" },
{ "name": "exact/test-package", "version": "1.0" },
{ "name": "notexact/testpackage", "version": "1.0" },
{ "name": "all/package1", "version": "1.0" },
{ "name": "all/package2", "version": "1.0" },
{ "name": "another/another", "version": "1.0" },
{ "name": "no/regexp", "version": "1.0" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
2020-03-11 08:34:40 +00:00
update vendor/Test* exact/test-package notexact/Test all/* no/reg.?xp
--EXPECT--
2020-03-11 08:34:40 +00:00
Upgrading all/package1 (1.0 => 2.0)
Upgrading all/package2 (1.0 => 2.0)
Upgrading exact/test-package (1.0 => 2.0)
Upgrading vendor/test-package (1.0 => 2.0)