Merge pull request #9902 from Seldaek/cyclic-deps
Detect and output a better hint for cyclic dependenciesmain
commit
21c70c2606
@ -0,0 +1,45 @@
|
||||
--TEST--
|
||||
Circular dependencies errors uses helpful message
|
||||
--COMPOSER--
|
||||
{
|
||||
"name": "root/pkg",
|
||||
"version": "dev-master",
|
||||
"require": {
|
||||
"requires/root": "1.0.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": [
|
||||
{
|
||||
"name": "requires/root",
|
||||
"version": "1.0.0",
|
||||
"source": { "reference": "some.branch", "type": "git", "url": "" },
|
||||
"require": {
|
||||
"root/pkg": "^1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "root/pkg",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
--RUN--
|
||||
update -v
|
||||
|
||||
--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 requires/root 1.0.0 -> satisfiable by requires/root[1.0.0].
|
||||
- requires/root 1.0.0 requires root/pkg ^1.0 -> satisfiable by root/pkg[1.0.0] from package repo (defining 2 packages) but root/pkg is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.
|
||||
|
||||
--EXPECT--
|
Loading…
Reference in New Issue