Fix self.version requirements failing the lock file integrity check if on a different version, fixes #11274 (#11283)
parent
0a2846cb24
commit
ad7bc18028
|
@ -518,6 +518,9 @@ class Locker
|
||||||
if (PlatformRepository::isPlatformPackage($link->getTarget())) {
|
if (PlatformRepository::isPlatformPackage($link->getTarget())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($link->getPrettyConstraint() === 'self.version') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($installedRepo->findPackagesWithReplacersAndProviders($link->getTarget(), $link->getConstraint()) === []) {
|
if ($installedRepo->findPackagesWithReplacersAndProviders($link->getTarget(), $link->getConstraint()) === []) {
|
||||||
$results = $installedRepo->findPackagesWithReplacersAndProviders($link->getTarget());
|
$results = $installedRepo->findPackagesWithReplacersAndProviders($link->getTarget());
|
||||||
if ($results !== []) {
|
if ($results !== []) {
|
||||||
|
|
|
@ -2,26 +2,30 @@
|
||||||
The locked version will not get overwritten by an install but fails on invalid packages
|
The locked version will not get overwritten by an install but fails on invalid packages
|
||||||
--COMPOSER--
|
--COMPOSER--
|
||||||
{
|
{
|
||||||
|
"version": "1.2.3",
|
||||||
"repositories": [
|
"repositories": [
|
||||||
{
|
{
|
||||||
"type": "package",
|
"type": "package",
|
||||||
"package": [
|
"package": [
|
||||||
{ "name": "foo/bar", "version": "1.0.0" },
|
{ "name": "foo/bar", "version": "1.0.0" },
|
||||||
{ "name": "foo/baz", "version": "1.0.0" },
|
{ "name": "foo/baz", "version": "1.0.0" },
|
||||||
{ "name": "foo/baz", "version": "2.0.0" }
|
{ "name": "foo/baz", "version": "2.0.0" },
|
||||||
|
{ "name": "foo/self", "version": "1.2.3" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"foo/bar": "2.0.0",
|
"foo/bar": "2.0.0",
|
||||||
"foo/baz": "2.0.0"
|
"foo/baz": "2.0.0",
|
||||||
|
"foo/self": "self.version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--LOCK--
|
--LOCK--
|
||||||
{
|
{
|
||||||
"packages": [
|
"packages": [
|
||||||
{ "name": "foo/bar", "version": "1.0.0" },
|
{ "name": "foo/bar", "version": "1.0.0" },
|
||||||
{ "name": "foo/baz", "version": "2.0.0" }
|
{ "name": "foo/baz", "version": "2.0.0" },
|
||||||
|
{ "name": "foo/self", "version": "1.2.2" }
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|
Loading…
Reference in New Issue