root-alias-change-with-circular-dep.test 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --TEST--
  2. Root alias changing after the lock file was created and invalidating it should show a decent error message
  3. This also checks that an implicit stabilityFlag is added for the root package, if it is a dev version
  4. --COMPOSER--
  5. {
  6. "name": "root/pkg",
  7. "repositories": [
  8. {
  9. "type": "package",
  10. "package": [
  11. {
  12. "name": "b/requirer", "version": "1.0.0",
  13. "require": { "root/pkg": "^1" }
  14. }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "b/requirer": "*"
  20. },
  21. "version": "2.x-dev"
  22. }
  23. --INSTALLED--
  24. [
  25. {
  26. "name": "b/requirer", "version": "1.0.0",
  27. "require": { "root/pkg": "^1" }
  28. }
  29. ]
  30. --LOCK--
  31. {
  32. "packages": [
  33. {
  34. "name": "b/requirer", "version": "1.0.0",
  35. "require": { "root/pkg": "^1" },
  36. "type": "library"
  37. }
  38. ],
  39. "packages-dev": [],
  40. "aliases": [],
  41. "minimum-stability": "stable",
  42. "stability-flags": [],
  43. "prefer-stable": false,
  44. "prefer-lowest": false,
  45. "platform": [],
  46. "platform-dev": []
  47. }
  48. --RUN--
  49. install
  50. --EXPECT-EXIT-CODE--
  51. 2
  52. --EXPECT-OUTPUT--
  53. Installing dependencies from lock file (including require-dev)
  54. Verifying lock file contents can be installed on current platform.
  55. Your lock file does not contain a compatible set of packages. Please run composer update.
  56. Problem 1
  57. - b/requirer is locked to version 1.0.0 and an update of this package was not requested.
  58. - b/requirer 1.0.0 requires root/pkg ^1 -> found root/pkg[2.x-dev] but it does not match the constraint.
  59. Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions.
  60. --EXPECT--