github-issues-4319.test 1003 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --TEST--
  2. See Github issue #4319 ( github.com/composer/composer/issues/4319 ).
  3. Present a clear error message when config.platform.php version results in a conflict rule.
  4. --CONDITION--
  5. !defined('HHVM_VERSION')
  6. --COMPOSER--
  7. {
  8. "repositories": [
  9. {
  10. "type": "package",
  11. "package": [
  12. { "name": "a/a", "version": "1.0.0", "require": { "php": "5.5" } }
  13. ]
  14. }
  15. ],
  16. "require": {
  17. "a/a": "~1.0"
  18. },
  19. "config": {
  20. "platform": {
  21. "php": "5.3"
  22. }
  23. }
  24. }
  25. --RUN--
  26. update
  27. --EXPECT-OUTPUT--
  28. Loading composer repositories with package information
  29. Updating dependencies
  30. Your requirements could not be resolved to an installable set of packages.
  31. Problem 1
  32. - Root composer.json requires a/a ~1.0 -> satisfiable by a/a[1.0.0].
  33. - a/a 1.0.0 requires php 5.5 -> your php version (5.3; overridden via config.platform, actual: %s) does not satisfy that requirement.
  34. --EXPECT--
  35. --EXPECT-EXIT-CODE--
  36. 2