aliased-priority-conflicting.test 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. --TEST--
  2. Aliases take precedence over default package even if default is selected
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/req", "version": "dev-feature-foo",
  11. "source": { "reference": "feat.f", "type": "git", "url": "" }
  12. },
  13. {
  14. "name": "a/req", "version": "dev-master",
  15. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  16. "source": { "reference": "forked", "type": "git", "url": "" }
  17. },
  18. {
  19. "name": "a/req", "version": "dev-master",
  20. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  21. "source": { "reference": "master", "type": "git", "url": "" }
  22. },
  23. {
  24. "name": "a/a", "version": "dev-master",
  25. "require": { "a/req": "dev-master" }
  26. },
  27. {
  28. "name": "a/b", "version": "dev-master",
  29. "require": { "a/req": "dev-master" }
  30. }
  31. ]
  32. }
  33. ],
  34. "require": {
  35. "a/a": "dev-master",
  36. "a/b": "dev-master",
  37. "a/req": "dev-feature-foo as dev-master"
  38. },
  39. "minimum-stability": "dev"
  40. }
  41. --EXPECT-LOCK--
  42. {
  43. "packages": [
  44. {
  45. "name": "a/a", "version": "dev-master",
  46. "require": { "a/req": "dev-master" },
  47. "type": "library"
  48. },
  49. {
  50. "name": "a/b", "version": "dev-master",
  51. "require": { "a/req": "dev-master" },
  52. "type": "library"
  53. },
  54. {
  55. "name": "a/req", "version": "dev-feature-foo",
  56. "source": { "reference": "feat.f", "type": "git", "url": "" },
  57. "type": "library"
  58. }
  59. ],
  60. "packages-dev": [],
  61. "aliases": [
  62. {
  63. "alias": "dev-master",
  64. "alias_normalized": "dev-master",
  65. "version": "dev-feature-foo",
  66. "package": "a/req"
  67. }
  68. ],
  69. "minimum-stability": "dev",
  70. "stability-flags": {
  71. "a/a": 20,
  72. "a/b": 20,
  73. "a/req": 20
  74. },
  75. "prefer-stable": false,
  76. "prefer-lowest": false,
  77. "platform": [],
  78. "platform-dev": []
  79. }
  80. --RUN--
  81. install
  82. --EXPECT--
  83. Installing a/req (dev-feature-foo feat.f)
  84. Marking a/req (dev-master feat.f) as installed, alias of a/req (dev-feature-foo feat.f)
  85. Installing a/a (dev-master)
  86. Marking a/a (9999999-dev) as installed, alias of a/a (dev-master)
  87. Installing a/b (dev-master)
  88. Marking a/b (9999999-dev) as installed, alias of a/b (dev-master)