aliased-priority-conflicting.test 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. },
  20. {
  21. "type": "package",
  22. "package": [
  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. "name": "a/req", "version": "dev-master",
  33. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  34. "source": { "reference": "master", "type": "git", "url": "" }
  35. }
  36. ]
  37. }
  38. ],
  39. "require": {
  40. "a/a": "dev-master",
  41. "a/b": "dev-master",
  42. "a/req": "dev-feature-foo as dev-master"
  43. },
  44. "minimum-stability": "dev"
  45. }
  46. --RUN--
  47. install
  48. --EXPECT--
  49. Installing a/req (dev-feature-foo feat.f)
  50. Marking a/req (dev-master feat.f) as installed, alias of a/req (dev-feature-foo feat.f)
  51. Installing a/a (dev-master)
  52. Installing a/b (dev-master)