provider-packages-can-not-be-installed-unless-selected.test 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. Test that providers can not be installed if they are not selected
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "foo/polyfill",
  11. "provide": {
  12. "foo/standard": "1.0.0"
  13. },
  14. "version": "1.0.0"
  15. },
  16. {
  17. "name": "foo/standard",
  18. "require": {
  19. "foo/does-not-exist": "1.0.0"
  20. },
  21. "version": "1.0.0"
  22. }
  23. ]
  24. }
  25. ],
  26. "require": {
  27. "foo/standard": "1.0.0"
  28. }
  29. }
  30. --RUN--
  31. update
  32. --EXPECT-EXIT-CODE--
  33. 2
  34. --EXPECT-OUTPUT--
  35. Loading composer repositories with package information
  36. Updating dependencies
  37. Your requirements could not be resolved to an installable set of packages.
  38. Problem 1
  39. - Root composer.json requires foo/standard 1.0.0 -> satisfiable by foo/standard[1.0.0].
  40. - foo/standard 1.0.0 requires foo/does-not-exist 1.0.0 -> could not be found in any version, there may be a typo in the package name.
  41. Potential causes:
  42. - A typo in the package name
  43. - The package is not available in a stable-enough version according to your minimum-stability setting
  44. see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
  45. - It's a private package and you forgot to add a custom repository to find it
  46. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
  47. --EXPECT--