How to override required version defined by composer.json hosted on packagist.org?

Viewed 5051

I've the following composer.json file:

{
  "require": {
    "guzzlehttp/guzzle": "^5.3"
  },
  "require-dev": {
    "aeris/guzzle-http-mock": ">=1.1.5"
  }
}

where I'd like to force aeris/guzzle-http-mock package to use different version of guzzlehttp/guzzle (such as 5.3.1), however it seems the requirements are read from the composer.json file hosted on packagist.org. Is there any workaround to override these requirements?

So instead of:

"guzzlehttp/guzzle": "~5.0.0"

I'd like to set:

"guzzlehttp/guzzle": "^5.3"

ideally by changing only my local composer.json file.

Currently the command displays the conflict errors:

$ composer install --prefer-source -vvv
Reading ./composer.json
Loading config file ./composer.json
...
Reading ~/.composer/cache/repo/https---packagist.org/provider-aeris$guzzle-http-mock.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.000 seconds
Reading ~/.composer/cache/repo/https---packagist.org/provider-guzzlehttp$guzzle.json from cache
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for aeris/guzzle-http-mock >=1.1.5 -> satisfiable by aeris/guzzle-http-mock[1.1.5].
    - aeris/guzzle-http-mock 1.1.5 requires guzzlehttp/guzzle ~5.0.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3] but these conflict with your requirements or minimum-stability.
1 Answers
Related