install-from-lock-removes-package.test 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. Install from a lock file that deleted a package
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "whitelisted/pkg", "version": "1.1.0" },
  10. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "fixed/dependency": "1.0.0", "old/dependency": "1.0.0" } },
  11. { "name": "fixed/dependency", "version": "1.1.0" },
  12. { "name": "fixed/dependency", "version": "1.0.0" },
  13. { "name": "old/dependency", "version": "1.0.0" }
  14. ]
  15. }
  16. ],
  17. "require": {
  18. "whitelisted/pkg": "1.*",
  19. "fixed/dependency": "1.*"
  20. }
  21. }
  22. --LOCK--
  23. {
  24. "packages": [
  25. { "name": "whitelisted/pkg", "version": "1.1.0" },
  26. { "name": "fixed/dependency", "version": "1.0.0" }
  27. ],
  28. "packages-dev": [],
  29. "aliases": [],
  30. "minimum-stability": "dev",
  31. "stability-flags": [],
  32. "prefer-stable": false
  33. }
  34. --INSTALLED--
  35. [
  36. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "old/dependency": "1.0.0", "fixed/dependency": "1.0.0" } },
  37. { "name": "fixed/dependency", "version": "1.0.0" },
  38. { "name": "old/dependency", "version": "1.0.0" }
  39. ]
  40. --RUN--
  41. install
  42. --EXPECT--
  43. Removing old/dependency (1.0.0)
  44. Upgrading whitelisted/pkg (1.0.0 => 1.1.0)