update-alias-lock.test 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --TEST--
  2. Update aliased package does not mess up the lock file
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/a", "version": "dev-master",
  11. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  12. "source": { "reference": "master", "type": "git", "url": "" }
  13. }
  14. ]
  15. },
  16. {
  17. "type": "package",
  18. "package": [
  19. {
  20. "name": "a/a", "version": "dev-master",
  21. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  22. "source": { "reference": "lowpriomaster", "type": "git", "url": "" }
  23. }
  24. ]
  25. }
  26. ],
  27. "require": {
  28. "a/a": "1.*"
  29. },
  30. "minimum-stability": "dev"
  31. }
  32. --LOCK--
  33. {
  34. "_": "outdated lock file, should not have to be loaded in an update",
  35. "packages": [
  36. { "package": "a/a", "version": "dev-master", "source-reference": "1234" },
  37. { "package": "a/a", "version": "dev-master", "alias-pretty-version": "1.0.x-dev", "alias-version": "1.0.9999999.9999999-dev" }
  38. ],
  39. "packages-dev": null,
  40. "aliases": [],
  41. "minimum-stability": "dev",
  42. "stability-flags": [],
  43. "prefer-stable": false,
  44. "prefer-lowest": false
  45. }
  46. --INSTALLED--
  47. [
  48. {
  49. "name": "a/a", "version": "dev-master",
  50. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  51. "source": { "reference": "1234", "type": "git", "url": "" }
  52. }
  53. ]
  54. --RUN--
  55. update
  56. --EXPECT-LOCK--
  57. {
  58. "packages": [
  59. {
  60. "name": "a/a", "version": "dev-master",
  61. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  62. "source": { "reference": "master", "type": "git", "url": "" },
  63. "type": "library"
  64. }
  65. ],
  66. "packages-dev": [],
  67. "aliases": [],
  68. "minimum-stability": "dev",
  69. "stability-flags": [],
  70. "prefer-stable": false,
  71. "prefer-lowest": false,
  72. "platform": [],
  73. "platform-dev": []
  74. }
  75. --EXPECT--
  76. Updating a/a (dev-master 1234) to a/a (dev-master master)