Skip to content

phpmock\phpunit\PHPMock not installing #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asra-baig opened this issue Feb 16, 2018 · 5 comments
Closed

phpmock\phpunit\PHPMock not installing #24

asra-baig opened this issue Feb 16, 2018 · 5 comments

Comments

@asra-baig
Copy link

Hi,
Successfully installed php-mock/php-mock and php-mock/php-mock-integration but unable to install php-mock/php-mock-phpunit.

This is the output:

Using version ^1.1 for php-mock/php-mock-phpunit
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- php-mock/php-mock-phpunit 1.1.2 requires php-mock/php-mock-integration ^1 -> satisfiable by php-mock/php-mock-integration[1.0.0] but these conflict with your requirements or minimum-stability.
- php-mock/php-mock-phpunit 1.1.1 requires php-mock/php-mock-integration ^1 -> satisfiable by php-mock/php-mock-integration[1.0.0] but these conflict with your requirements or minimum-stability.
- php-mock/php-mock-phpunit 1.1.0 requires php-mock/php-mock-integration ^1 -> satisfiable by php-mock/php-mock-integration[1.0.0] but these conflict with your requirements or minimum-stability.
- Installation request for php-mock/php-mock-phpunit ^1.1 -> satisfiable by php-mock/php-mock-phpunit[1.1.0, 1.1.1, 1.1.2].

Installation failed, reverting ./composer.json to its original content.

@michalbundyra
Copy link
Member

@asra-baig What version of PHPUnit are you using?

@asra-baig
Copy link
Author

asra-baig commented Mar 22, 2018 via email

@michalbundyra
Copy link
Member

@asra-baig

Here is my composer.json:

{
    "name": "php-mock/test",
    "require": {
        "php": "^5.6 || ^7.0"
    },
    "require-dev": {
        "php-mock/php-mock-phpunit": "^1.1",
        "phpunit/phpunit": "^5.6"
    },
    "config": {
        "platform": {
            "php": "5.6"
        }
    }
}

(I have there config section only to make sure all dependencies will be compatible with PHP 5.6 when running composer on PHP > 5.6).

Here is the result of composer install:

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 28 installs, 0 updates, 0 removals
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing php-mock/php-mock (1.0.1): Loading from cache
  - Installing symfony/yaml (v3.4.6): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/resource-operations (1.0.0): Loading from cache
  - Installing sebastian/recursion-context (2.0.0): Loading from cache
  - Installing sebastian/object-enumerator (2.0.1): Loading from cache
  - Installing sebastian/global-state (1.1.1): Loading from cache
  - Installing sebastian/exporter (2.0.0): Loading from cache
  - Installing sebastian/environment (2.0.0): Loading from cache
  - Installing sebastian/diff (1.4.3): Loading from cache
  - Installing sebastian/comparator (1.2.4): Loading from cache
  - Installing doctrine/instantiator (1.0.5): Loading from cache
  - Installing phpunit/phpunit-mock-objects (3.4.4): Loading from cache
  - Installing phpunit/php-timer (1.0.9): Loading from cache
  - Installing phpunit/php-file-iterator (1.4.5): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-token-stream (1.4.12): Loading from cache
  - Installing phpunit/php-code-coverage (4.0.8): Loading from cache
  - Installing webmozart/assert (1.3.0): Loading from cache
  - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (3.3.2): Loading from cache
  - Installing phpspec/prophecy (1.7.5): Loading from cache
  - Installing myclabs/deep-copy (1.7.0): Loading from cache
  - Installing phpunit/phpunit (5.7.27): Loading from cache
  - Installing php-mock/php-mock-integration (1.0.0): Loading from cache
  - Installing php-mock/php-mock-phpunit (1.1.2): Loading from cache
php-mock/php-mock suggests installing php-mock/php-mock-mockery (Allows using PHPMockery for Mockery integration)
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files

So I can't reproduce your issue.

Please provide more details if it is still an issue.

@tm1000
Copy link

tm1000 commented Jul 16, 2018

php-mock-phpunit is locked to php-mock 1.x.x. if you composer require php-mock/php-mock --dev you'll get version 2.0 (that is their dev stability). This conflicts with that.

Therefore you need to:

composer remove php-mock/php-mock
composer require --dev php-mock/php-mock-phpunit

php-mock/php-mock-mockery on the other hand requires php-mock 2.0. So it doesn't have this issue

@michalbundyra
Copy link
Member

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants