repositories-priorities3.test 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --TEST--
  2. Test that filter repositories apply correctly
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "foo/a", "version": "1.0.0" }
  10. ],
  11. "canonical": false
  12. },
  13. {
  14. "type": "package",
  15. "package": [
  16. { "name": "foo/a", "version": "1.0.0" },
  17. { "name": "foo/b", "version": "1.0.0" }
  18. ],
  19. "only": ["foo/b"]
  20. },
  21. {
  22. "type": "package",
  23. "package": [
  24. { "name": "foo/a", "version": "1.2.0" },
  25. { "name": "foo/c", "version": "1.2.0" }
  26. ],
  27. "exclude": ["foo/c"]
  28. },
  29. {
  30. "type": "package",
  31. "package": [
  32. { "name": "foo/a", "version": "1.1.0" },
  33. { "name": "foo/b", "version": "1.1.0" },
  34. { "name": "foo/c", "version": "1.1.0" }
  35. ]
  36. }
  37. ],
  38. "require": {
  39. "foo/a": "1.*",
  40. "foo/b": "1.*",
  41. "foo/c": "1.*"
  42. }
  43. }
  44. --RUN--
  45. update
  46. --EXPECT--
  47. Installing foo/a (1.2.0)
  48. Installing foo/b (1.0.0)
  49. Installing foo/c (1.1.0)