1
0
Fork 0

Fix tests

pull/12114/head
Jordi Boggiano 2024-09-18 16:32:40 +02:00
parent ad6198ad2a
commit e5af569bfc
No known key found for this signature in database
83 changed files with 262 additions and 259 deletions
tests/Composer/Test
Fixtures
functional
installed-versions2
plugin-autoloading-only-loads-dependencies
installer

View File

@ -231,10 +231,10 @@
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"platform": {},
"platform-dev": {},
"plugin-api-version": "2.0.0"
}

View File

@ -29,10 +29,10 @@
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"platform": {},
"platform-dev": {},
"plugin-api-version": "2.2.0"
}

View File

@ -57,11 +57,11 @@ update
"alias_normalized": "3.0.3.0"
}],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing a/aliased2 (3.0.2)

View File

@ -35,11 +35,11 @@ Newly defined root aliases end up in lock file only if the package is updated
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update a/aliased
@ -63,11 +63,11 @@ update a/aliased
"alias_normalized": "3.0.3.0"
}],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing a/aliased (3.0.2)

View File

@ -26,11 +26,11 @@ Test the error output of solver problems with dev-master aliases.
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -24,11 +24,11 @@ Test the error output of solver problems with dev-master aliases.
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -55,8 +55,8 @@ update
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing a/aliased (dev-master abcd)

View File

@ -80,8 +80,8 @@ Aliases take precedence over default package even if default is selected
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -78,8 +78,8 @@ update
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing a/aliased (dev-next)

View File

@ -34,8 +34,8 @@ Test that conflict with a branch alias in the lock file leads to an error on ins
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -36,8 +36,8 @@ update
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing some/dep (1.2.x-dev)

View File

@ -24,11 +24,11 @@ Verify that a conflict with all dependencies option enabled don't recommend to u
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -45,8 +45,8 @@ that are also a root package, when that root package is also explicitly allowed.
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update a/a b/b --with-dependencies

View File

@ -39,11 +39,11 @@ dependency of one the requirements that is allowed for update.
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update b/b --with-dependencies

View File

@ -50,8 +50,8 @@ install
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing a/a (dev-master)

View File

@ -28,7 +28,7 @@ is issued when allow-missing-requirements if enabled
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -24,7 +24,7 @@ Requirements from the composer file are not installed if the lock file is presen
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -28,7 +28,7 @@ Install from a lock file that deleted a package
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false
}
--INSTALLED--

View File

@ -32,7 +32,7 @@ Installing an old alias that doesn't exist anymore from a lock is possible
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -29,11 +29,11 @@ Ensure that a package gets loaded which was previously skipped due to replacemen
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update root/dep --with-all-dependencies
@ -42,4 +42,3 @@ Installing replacer/pkg (1.1.0)
Installing root/dep (1.2.0)
Installing replaced/pkg (1.0.0)
Installing root/no-update (1.0.0)

View File

@ -16,11 +16,11 @@ Test that install checks missing requirements from both composer.json if the loc
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -16,11 +16,11 @@ Platform requires appearing in both lock and composer.json will be checked using
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {"php": "^20", "ext-foo": "^5"},
"platform-dev": []
"platform-dev": {}
}
--RUN--
install

View File

@ -44,8 +44,8 @@ Partial updates always update path repos which are symlinked, but not those whic
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--

View File

@ -37,8 +37,8 @@ Partial update from lock file should apply lock file and if an unstable package
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--
[

View File

@ -59,11 +59,11 @@ Partial update forces updates dev reference from lock file for non allowed packa
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update b/b
@ -86,11 +86,11 @@ update b/b
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/a (dev-master oldmaster-a => dev-master newmaster-a)

View File

@ -36,11 +36,11 @@ Partial update from lock file with root aliases should work
}
],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--
[
@ -67,11 +67,11 @@ update --lock
}
],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Marking c/aliased (2.0.0) as installed, alias of c/aliased (1.0.0)

View File

@ -43,8 +43,8 @@ Partial update from lock file should update everything to the state of the lock,
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--
[
@ -67,11 +67,11 @@ update b/unstable
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/old (0.9.0 => 1.0.0)

View File

@ -62,11 +62,11 @@ Partial update installs from lock even if package don't exist in public repo any
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update b/b
@ -90,11 +90,11 @@ update b/b
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Marking a/a (2.1.x-dev oldmaster-a) as uninstalled, alias of a/a (dev-master oldmaster-a)

View File

@ -36,8 +36,8 @@ Ensure that a partial update of a dependency does not conflict if the only way t
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update dep/pkg2 --with-dependencies
@ -52,11 +52,11 @@ update dep/pkg2 --with-dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing dep/pkg1 (1.0.0)

View File

@ -36,8 +36,8 @@ Ensure that a partial update of a dependency does not conflict if the only way t
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update dep/pkg2 --with-dependencies
@ -52,11 +52,11 @@ update dep/pkg2 --with-dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing dep/pkg1 (1.0.0)

View File

@ -34,8 +34,8 @@ Partial updates always load root aliases even for path repos which are symlinked
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--

View File

@ -36,8 +36,8 @@ Ensure a partial update of a dependency does NOT update dependencies which provi
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update root/req1 --with-dependencies
@ -52,11 +52,11 @@ update root/req1 --with-dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing dep/pkg1 (1.0.0)

View File

@ -35,8 +35,8 @@ Ensure a partial update of a dependency updates dependencies which replace one o
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update root/req1 --with-dependencies
@ -50,11 +50,11 @@ update root/req1 --with-dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing dep/pkg1 (1.2.0)

View File

@ -74,8 +74,8 @@ Ensure that a partial update of a dependency does not conflict if the only way t
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update update/pkg1 --with-dependencies
@ -101,11 +101,11 @@ update update/pkg1 --with-dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-OUTPUT--
Loading composer repositories with package information

View File

@ -64,8 +64,8 @@ Partially updating one root requirement with transitive deps fully updates trans
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -27,11 +27,11 @@ Test the error output of solver problems with ext/platform packages which have p
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -91,11 +91,11 @@ Test the error output minifies version lists
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
@ -115,4 +115,3 @@ Your requirements could not be resolved to an installable set of packages.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
--EXPECT--

View File

@ -42,11 +42,11 @@ update --no-dev
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Installing b/b (1.0.0)

View File

@ -34,7 +34,7 @@ Removing a package deletes unused dependencies and does not update other depende
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -27,7 +27,7 @@ Removing a package has no effect if another package would require an update in o
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -29,8 +29,8 @@ Requiring a replaced package in a version, that is not provided by the replacing
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -41,11 +41,11 @@ This also checks that an implicit stabilityFlag is added for the root package, i
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -24,11 +24,11 @@ Newly defined root alias does not get loaded if package is loaded from lock file
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--
[

View File

@ -45,7 +45,7 @@ The locked version will not get overwritten by an install but fails on invalid p
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -86,11 +86,11 @@ Test the error output of solver problems.
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--

View File

@ -22,11 +22,11 @@ Suggestions are not displayed for when not updating the lock file
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
install

View File

@ -52,11 +52,11 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/a (dev-master 1234 => dev-master master)

View File

@ -37,7 +37,7 @@ Updating an aliased package where the old alias matches the new package should n
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}
@ -64,11 +64,11 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-INSTALLED--
[

View File

@ -40,11 +40,11 @@ Update with a package allow list only updates those packages if they are not pre
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update allowed/pkg dependency/pkg

View File

@ -49,11 +49,11 @@ Updating transitive dependencies only updates what is really required when a min
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update allowed/pkg --with-all-dependencies --minimal-changes

View File

@ -51,11 +51,11 @@ Update with a package allow list pattern and all-dependencies flag updates packa
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update allowed/pkg-* --with-all-dependencies

View File

@ -63,11 +63,11 @@ Update with a package allow list only updates those packages and their dependenc
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update allowed/pkg-* foobar --with-dependencies

View File

@ -54,11 +54,11 @@ Update with a package allow list only updates those corresponding to the pattern
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update vendor/Test* exact/test-package notexact/Test all/* no/reg.?xp

View File

@ -31,7 +31,7 @@ Limited update takes rules from lock if available, and not from the installed re
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -35,11 +35,11 @@ Update with a package allow list removes unused packages
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update --with-dependencies allowed/pkg

View File

@ -31,11 +31,11 @@ A partial update for a new package yet to be installed should remove another dep
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update new/pkg

View File

@ -33,11 +33,11 @@ Verify that partial updates warn about using patterns in the argument which have
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update b/b foo/bar baz/* --with-dependencies

View File

@ -49,11 +49,11 @@ Verify that a partial update with deps correctly keeps track of all aliases.
}
],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update new/pkg --with-all-dependencies
@ -87,8 +87,8 @@ update new/pkg --with-all-dependencies
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Marking current/dep2 (1.0.x-dev) as uninstalled, alias of current/dep2 (dev-foo)

View File

@ -36,11 +36,11 @@ When partially updating a package to a newer version and the new version has a n
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update root/pkg2 --with-dependencies

View File

@ -36,11 +36,11 @@ Require a new package in the composer.json and updating with its name as an argu
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update new/pkg --with-dependencies

View File

@ -31,11 +31,11 @@ Require a new package in the composer.json and updating with its name as an argu
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update new/pkg --with-dependencies

View File

@ -35,11 +35,11 @@ Require a new package in the composer.json and updating with its name as an argu
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update new/pkg --with-dependencies

View File

@ -45,11 +45,11 @@ Update with a package allow list only updates those packages listed as command a
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update allowed/pkg

View File

@ -159,8 +159,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-LOCK--
{
@ -226,8 +226,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update a/a b/b d/d g/g

View File

@ -59,11 +59,11 @@ Updating dev packages where no reference change happened triggers a repo url cha
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update
@ -86,11 +86,11 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/a (dev-master oldmaster => dev-master newmaster)

View File

@ -147,8 +147,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-LOCK--
{
@ -204,8 +204,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update mirrors

View File

@ -38,11 +38,11 @@ Update mirrors with a new root require which is not yet in lock should simply ig
],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update mirrors
@ -56,10 +56,10 @@ update mirrors
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--

View File

@ -54,8 +54,8 @@ Updates with --no-dev but we still end up with a complete lock file including de
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update --no-dev

View File

@ -47,11 +47,11 @@ update --no-install
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-INSTALLED--

View File

@ -28,11 +28,11 @@ Update package which is in lock file but not in remote repo at all should show t
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update main/dep --with-all-dependencies

View File

@ -30,11 +30,11 @@ Update package which is in lock file but not remote repo due to min-stability sh
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update main/dep --with-all-dependencies

View File

@ -29,11 +29,11 @@ Update package which is in lock file but not in remote repo in the correct versi
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update main/dep --with-all-dependencies

View File

@ -33,11 +33,11 @@ Update package which is in lower prio repo but not main repo due to min-stabilit
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update main/dep --with-all-dependencies

View File

@ -35,11 +35,11 @@ Converting from one VCS type to another (including an URL change) should update
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update mirrors
@ -55,11 +55,11 @@ update mirrors
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/a (1.0.0 old-hg-ref => 1.0.0 new-git-ref)

View File

@ -24,11 +24,11 @@ A composer update should remove unused locked dependencies from the lock file an
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--INSTALLED--
[
@ -46,11 +46,11 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT-OUTPUT--
Loading composer repositories with package information

View File

@ -34,11 +34,11 @@ Update updates the outdated state of packages
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update

View File

@ -11,10 +11,10 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--

View File

@ -25,11 +25,11 @@ Update to a state without dependency works well from locked with dependency
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update
@ -39,11 +39,11 @@ update
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Removing a/a (dev-master 1234)

View File

@ -37,11 +37,11 @@ When `--with-all-dependencies` is used, Composer should update the dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--RUN--
update b/b --with-all-dependencies

View File

@ -20,7 +20,7 @@ Installing locked dev packages should remove old dependencies
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false
}

View File

@ -61,8 +61,8 @@ update
"stability-flags": {"a/a":20},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
"platform": {},
"platform-dev": {}
}
--EXPECT--
Upgrading a/a (dev-master oldref => dev-master newref)

View File

@ -444,6 +444,11 @@ class InstallerTest extends TestCase
self::assertEquals($expectResult, $result, $output . stream_get_contents($appOutput));
if ($expectLock && isset($actualLock)) {
unset($actualLock['hash'], $actualLock['content-hash'], $actualLock['_readme'], $actualLock['plugin-api-version']);
foreach (['stability-flags', 'platform', 'platform-dev'] as $key) {
if ($expectLock[$key] === []) {
$expectLock[$key] = new \stdClass;
}
}
self::assertEquals($expectLock, $actualLock);
}

View File

@ -113,9 +113,9 @@ class LockerTest extends TestCase
'packages-dev' => [],
'aliases' => [],
'minimum-stability' => 'dev',
'stability-flags' => [],
'platform' => [],
'platform-dev' => [],
'stability-flags' => new \stdClass,
'platform' => new \stdClass,
'platform-dev' => new \stdClass,
'platform-overrides' => ['foo/bar' => '1.0'],
'prefer-stable' => false,
'prefer-lowest' => false,