1

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:

  • Changing the PHPUnit version to 7.0 didn't work and gave the same errors.
  • composer self-update wasn't necessary and didn't solve the issue.
  • composer require --dev phpunit/phpunit ^6.4 (as suggested in the official documentation of PHPUnit) updates composer.json and crashes.
  • composer install tries to reverse a lot of updates and then also crashes on phpunit/php-code-coverage. composer update then updates the reverted updates from install again (before crashing).
  • deleting the entire vendor folder and reinstalling it also crashed.
  • Moving phpunit/phpunit to require instead of require-dev, then running composer update also crashed.
  • PHP itself is version 7.1.10, so I don't think it's the problem.
4
  • Are you running a VM? I had a problem where Composer would use up all the memory. I had to create a swap to use Composer. Commented Nov 29, 2017 at 14:56
  • Nope, I'm not running a VM. Just using Windows. Commented Nov 29, 2017 at 14:57
  • Did you try composer clearcache and then removing vendor-folder before composer update -v ? Commented Nov 30, 2017 at 20:44
  • Your issue is more windows/php related than a composer related, can you paste full crash log? Follow these instructions to get it support.microsoft.com/en-us/help/2722492/… Commented Dec 2, 2017 at 22:06

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Friedrich you are a real hero !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.