-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add InstallerTest for path repo symlink unfixing
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
tests/Composer/Test/Fixtures/installer/partial-update-with-symlinked-path-repos.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,91 @@ | ||
--TEST-- | ||
Partially updating one root requirement with transitive deps fully updates transitive deps, and always updates symlinked path repos, but not the transitive deps of the path repos. | ||
|
||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{"type": "path", "url": "./DependencyResolver/Fixtures/poolbuilder/symlinked-path-repo"}, | ||
{"type": "path", "url": "./DependencyResolver/Fixtures/poolbuilder/mirrored-path-repo", "options": {"symlink": false}}, | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{"name": "root/update", "version": "1.0.4", "require": {"symlinked/transitive2": ">=1.0.1", "mirrored/transitive2": ">=1.0.1"}}, | ||
{"name": "symlinked/transitive", "version": "1.0.0"}, | ||
{"name": "symlinked/transitive", "version": "1.0.1"}, | ||
{"name": "symlinked/transitive2", "version": "1.0.0"}, | ||
{"name": "symlinked/transitive2", "version": "1.0.3"}, | ||
{"name": "mirrored/transitive", "version": "1.0.0"}, | ||
{"name": "mirrored/transitive", "version": "1.0.5"}, | ||
{"name": "mirrored/transitive2", "version": "1.0.0"}, | ||
{"name": "mirrored/transitive2", "version": "1.0.7"} | ||
] | ||
} | ||
], | ||
"require": { | ||
"root/update": "*", | ||
"symlinked/path-pkg": "*", | ||
"mirrored/path-pkg": "*" | ||
} | ||
} | ||
--LOCK-- | ||
{ | ||
"packages": [ | ||
{"name": "root/update", "version": "1.0.1", "require": {"symlinked/transitive2": ">=1.0.1", "mirrored/transitive2": ">=1.0.1"}}, | ||
{"name": "symlinked/transitive", "version": "1.0.0"}, | ||
{"name": "symlinked/transitive2", "version": "1.0.0"}, | ||
{"name": "mirrored/transitive", "version": "1.0.0"}, | ||
{"name": "mirrored/transitive2", "version": "1.0.0"}, | ||
{ | ||
"name": "symlinked/path-pkg", | ||
"version": "1.0.0", | ||
"require": { | ||
"symlinked/transitive": "1.*", | ||
"symlinked/transitive2": "1.*" | ||
}, | ||
"dist": {"type": "path", "url": "./symlinked-path-repo", "reference": "abcd"}, "transport-options": {} | ||
}, | ||
{ | ||
"name": "mirrored/path-pkg", | ||
"version": "1.0.0", | ||
"require": { | ||
"mirrored/transitive": "1.*", | ||
"mirrored/transitive2": "1.*" | ||
}, | ||
"dist": {"type": "path", "url": "./mirrored-path-repo", "reference": "abcd"}, "transport-options": {"symlink": false} | ||
} | ||
], | ||
"packages-dev": [], | ||
"aliases": [], | ||
"minimum-stability": "stable", | ||
"stability-flags": { | ||
}, | ||
"prefer-stable": false, | ||
"prefer-lowest": false, | ||
"platform": [], | ||
"platform-dev": [] | ||
} | ||
--INSTALLED-- | ||
[ | ||
{ "name": "a/old", "version": "0.9.0" }, | ||
{ "name": "b/unstable", "version": "1.1.0-alpha", "require": {"f/dependency": "1.*"} }, | ||
{ "name": "c/uptodate", "version": "2.0.0" }, | ||
{ "name": "f/dependency", "version": "1.0.0" } | ||
] | ||
--RUN-- | ||
update --with-all-dependencies root/update | ||
|
||
--EXPECT-EXIT-CODE-- | ||
2 | ||
|
||
--EXPECT-OUTPUT-- | ||
Loading composer repositories with package information | ||
Updating dependencies | ||
Your requirements could not be resolved to an installable set of packages. | ||
|
||
Problem 1 | ||
- Root composer.json requires symlinked/path-pkg * -> satisfiable by symlinked/path-pkg[2.0.0]. | ||
- symlinked/path-pkg 2.0.0 requires symlinked/transitive 2.* -> found symlinked/transitive[1.0.0, 1.0.1] but it does not match the constraint. | ||
|
||
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. | ||
|
||
--EXPECT-- |