forked from composer/composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --minimal-changes mode to perform partial updates --with-dependen…
…cies while changing only what is necessary in other dependencies (composer#11665)
- Loading branch information
1 parent
c97e2d2
commit 44ba0ba
Showing
10 changed files
with
193 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
tests/Composer/Test/Fixtures/installer/update-allow-list-minimal-changes.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--TEST-- | ||
Updating transitive dependencies only updates what is really required when a minimal update is requested | ||
|
||
* dependency/pkg has to upgrade to 2.x | ||
* dependency/pkg2 remains at 1.0.0 and does not upgrade to 1.1.0 even though it would without minimal update | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ "name": "allowed/pkg", "version": "1.1.0", "require": { "dependency/pkg": "2.*", "dependency/pkg2": "1.*" } }, | ||
{ "name": "allowed/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.*", "dependency/pkg2": "1.*" } }, | ||
{ "name": "dependency/pkg", "version": "2.0.0" }, | ||
{ "name": "dependency/pkg", "version": "1.1.0" }, | ||
{ "name": "dependency/pkg", "version": "1.0.0" }, | ||
{ "name": "dependency/pkg2", "version": "2.0.0" }, | ||
{ "name": "dependency/pkg2", "version": "1.1.0" }, | ||
{ "name": "dependency/pkg2", "version": "1.0.0" }, | ||
{ "name": "unrelated/pkg", "version": "1.1.0", "require": { "unrelated/pkg-dependency": "1.*" } }, | ||
{ "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } }, | ||
{ "name": "unrelated/pkg-dependency", "version": "1.1.0" }, | ||
{ "name": "unrelated/pkg-dependency", "version": "1.0.0" } | ||
] | ||
} | ||
], | ||
"require": { | ||
"allowed/pkg": "1.*", | ||
"unrelated/pkg": "1.*" | ||
} | ||
} | ||
--INSTALLED-- | ||
[ | ||
{ "name": "allowed/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.*", "dependency/pkg2": "1.*" } }, | ||
{ "name": "dependency/pkg", "version": "1.0.0" }, | ||
{ "name": "dependency/pkg2", "version": "1.0.0" }, | ||
{ "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } }, | ||
{ "name": "unrelated/pkg-dependency", "version": "1.0.0" } | ||
] | ||
--LOCK-- | ||
{ | ||
"packages": [ | ||
{ "name": "allowed/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.*", "dependency/pkg2": "1.*" } }, | ||
{ "name": "dependency/pkg", "version": "1.0.0" }, | ||
{ "name": "dependency/pkg2", "version": "1.0.0" }, | ||
{ "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } }, | ||
{ "name": "unrelated/pkg-dependency", "version": "1.0.0" } | ||
], | ||
"packages-dev": [], | ||
"aliases": [], | ||
"minimum-stability": "dev", | ||
"stability-flags": [], | ||
"prefer-stable": false, | ||
"prefer-lowest": false, | ||
"platform": [], | ||
"platform-dev": [] | ||
} | ||
--RUN-- | ||
update allowed/pkg --with-all-dependencies --minimal-changes | ||
--EXPECT-- | ||
Upgrading dependency/pkg (1.0.0 => 2.0.0) | ||
Upgrading allowed/pkg (1.0.0 => 1.1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters