NMR-3
NMR-3

Reputation: 35

Composer cannot update or install PHPUnit/php-code-coverage

Problem:

I'm trying to run composer update, but it crashes on trying to install PHPUnit/php-code-coverage. (I'm running update to try and solve a different problem, but that's probably not relevant.)

What seems to be happening is composer update starts off fine and tries to update other packages, but whenever it reaches PHPUnit/php-code-coverage it crashes immediately.

Output from the CLI:

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 31 installs, 0 updates, 0 removals
  - Installing phpunit/php-code-coverage (5.2.4): Loading from cache

And then the CLI (php.exe) crashes with error code c0000005.

Composer.json:

//...
"require": {
    "php": ">=7.0.0",
    "algolia/algoliasearch-client-php": "1.23.1",
    "barryvdh/laravel-dompdf": "^0.8.1",
    "barryvdh/laravel-ide-helper": "v2.4.1",
    "codeception/codeception": "2.3.6",
    "fideloper/proxy": "~3.3",
    "laravel/framework": "5.5.*",
    "laravel/scout": "3.0.x-dev",
    "laravel/tinker": "~1.0",
    "mollie/mollie-api-php": "1.9.*",
    "stripe/stripe-php": "^5.6"
},
"require-dev": {
    "filp/whoops": "~2.0",
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~6.0"
},
//...

What I've tried:

Upvotes: 1

Views: 3163

Answers (1)

Friedrich
Friedrich

Reputation: 81

I had the same problem with the package phpunit\php-code-coverage. It's caused by a too long path.

You use --prefer-source as workaround:

composer install --prefer-source

This solution I found also here.

Upvotes: 4

Related Questions