root-requirements-do-not-affect-locked-versions.test 929 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. The locked version will not get overwritten by an install
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "foo/bar", "version": "1.0.0" },
  10. { "name": "foo/baz", "version": "1.0.0" },
  11. { "name": "foo/baz", "version": "2.0.0" }
  12. ]
  13. }
  14. ],
  15. "require": {
  16. "foo/bar": "2.0.0",
  17. "foo/baz": "2.0.0"
  18. }
  19. }
  20. --LOCK--
  21. {
  22. "packages": [
  23. { "name": "foo/bar", "version": "1.0.0" },
  24. { "name": "foo/baz", "version": "2.0.0" }
  25. ],
  26. "packages-dev": [],
  27. "aliases": [],
  28. "minimum-stability": "stable",
  29. "stability-flags": [],
  30. "prefer-stable": false,
  31. "prefer-lowest": false
  32. }
  33. --INSTALLED--
  34. [
  35. { "name": "foo/bar", "version": "1.0.0" },
  36. { "name": "foo/baz", "version": "1.0.0" }
  37. ]
  38. --RUN--
  39. install
  40. --EXPECT--
  41. Upgrading foo/baz (1.0.0 => 2.0.0)