Update lock syntax in tests and verify installed version does not impact lock generation
Particularly the test tests/Composer/Test/Fixtures/installer/partial-update-downgrades-non-whitelisted-unstable.test is interesting because it verifies that an older version will be installed on update if the new one is only present in the installed repo or vendor dir. This was the cause of a lot of weird edge cases and unreliable update behavior in Composer v1pull/7936/head
parent
0ff07015a1
commit
94d45a980c
|
@ -29,7 +29,7 @@ Installing an old alias that doesn't exist anymore from a lock is possible
|
|||
"type": "library"
|
||||
}
|
||||
],
|
||||
"packages-dev": null,
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
|
|
|
@ -53,7 +53,7 @@ update c/uptodate
|
|||
"packages": [
|
||||
{ "name": "a/old", "version": "1.0.0", "type": "library" },
|
||||
{ "name": "b/unstable", "version": "1.0.0", "type": "library" },
|
||||
{ "name": "c/uptodate", "version": "2.0.0", "type": "library" },
|
||||
{ "name": "c/uptodate", "version": "1.0.0", "type": "library" },
|
||||
{ "name": "d/removed", "version": "1.0.0", "type": "library" }
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
@ -66,6 +66,7 @@ update c/uptodate
|
|||
"platform-dev": []
|
||||
}
|
||||
--EXPECT--
|
||||
Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)
|
||||
Updating a/old (0.9.0) to a/old (1.0.0)
|
||||
Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0)
|
||||
Updating c/uptodate (2.0.0) to c/uptodate (1.0.0)
|
||||
Installing d/removed (1.0.0)
|
||||
|
|
|
@ -39,10 +39,31 @@ Update with a package whitelist only updates those corresponding to the pattern
|
|||
{ "name": "another/another", "version": "1.0" },
|
||||
{ "name": "no/regexp", "version": "1.0" }
|
||||
]
|
||||
--LOCK--
|
||||
{
|
||||
"packages": [
|
||||
{ "name": "vendor/Test-Package", "version": "1.0" },
|
||||
{ "name": "vendor/NotMe", "version": "1.0" },
|
||||
{ "name": "exact/Test-Package", "version": "1.0" },
|
||||
{ "name": "notexact/TestPackage", "version": "1.0" },
|
||||
{ "name": "all/Package1", "version": "1.0" },
|
||||
{ "name": "all/Package2", "version": "1.0" },
|
||||
{ "name": "another/another", "version": "1.0" },
|
||||
{ "name": "no/regexp", "version": "1.0" }
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
||||
--RUN--
|
||||
update vendor/Test* exact/Test-Package notexact/Test all/* no/reg?xp
|
||||
--EXPECT--
|
||||
Updating vendor/Test-Package (1.0) to vendor/Test-Package (2.0)
|
||||
Updating exact/Test-Package (1.0) to exact/Test-Package (2.0)
|
||||
Updating all/Package1 (1.0) to all/Package1 (2.0)
|
||||
Updating all/Package2 (1.0) to all/Package2 (2.0)
|
||||
Updating exact/Test-Package (1.0) to exact/Test-Package (2.0)
|
||||
Updating vendor/Test-Package (1.0) to vendor/Test-Package (2.0)
|
||||
|
|
|
@ -28,7 +28,7 @@ Limited update takes rules from lock if available, and not from the installed re
|
|||
{ "name": "toupdate/installed", "version": "1.0.0" },
|
||||
{ "name": "toupdate/notinstalled", "version": "1.0.0" }
|
||||
],
|
||||
"packages-dev": null,
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
|
@ -43,6 +43,6 @@ Limited update takes rules from lock if available, and not from the installed re
|
|||
--RUN--
|
||||
update toupdate/installed
|
||||
--EXPECT--
|
||||
Updating toupdate/installed (1.0.0) to toupdate/installed (1.1.0)
|
||||
Updating old/installed (0.9.0) to old/installed (1.0.0)
|
||||
Updating toupdate/installed (1.0.0) to toupdate/installed (1.1.0)
|
||||
Installing toupdate/notinstalled (1.0.0)
|
||||
|
|
Loading…
Reference in New Issue