> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Updating drupal/coder (8.2.12 => 8.3.1)    The package has modified files:
    D coder_sniffer/Drupal/Test/Array/ArrayUnitTest.inc
    D coder_sniffer/Drupal/Test/Array/ArrayUnitTest.inc.fixed
    D coder_sniffer/Drupal/Test/Array/ArrayUnitTest.php
    D coder_sniffer/Drupal/Test/Array/DisallowLongArraySyntaxUnitTest.php
    D coder_sniffer/Drupal/Test/Array/disallow_long_array_d7/DisallowLongArraySyntaxUnitTest.1.inc
    D coder_sniffer/Drupal/Test/Array/disallow_long_array_d7/disallow_long_array_d7.info
    D coder_sniffer/Drupal/Test/Array/disallow_long_array_d8/DisallowLongArraySyntaxUnitTest.2.inc
    D coder_sniffer/Drupal/Test/Array/disallow_long_array_d8/DisallowLongArraySyntaxUnitTest.2.inc.fixed
    D coder_sniffer/Drupal/Test/Array/disallow_long_array_d8/disallow_long_array_d8.info.yml
    D coder_sniffer/Drupal/Test/Classes/ClassCreateInstanceUnitTest.inc

  A non-numeric value encountered  

I have tried with errors

$ composer require drupal/coder ^8.3  
./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
    - The requested package symfony/debug (locked at v4.1.7, required as ^3.4.0) is satisfiable by symfony/debug[v4.1.7] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Conclusion: remove doctrine/annotations v1.6.0
    - Conclusion: don't install doctrine/annotations v1.6.0
    - Can only install one of: doctrine/annotations[v1.2.0, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.1, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.2, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.3, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.4, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.5, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.6, v1.6.0].
    - Can only install one of: doctrine/annotations[v1.2.7, v1.6.0].
    - Installation request for doctrine/annotations (locked at v1.6.0, required as ^1.2) -> satisfiable by doctrine/annotations[v1.6.0].
    - Installation request for doctrine/annotations 1.2.* -> satisfiable by doctrine/annotations[v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.2.4, v1.2.5, v1.2.6, v1.2.7].

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

Also tried with errors

rm vendor/ -rf 
composer update
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package doctrine/annotations 1.2.* exists as doctrine/annotations[v1.6.0] but these are rejected by your constraint.

but always end up with other errors Any thoughts ?

  • composer require drupal/coder ^8.3 mising the colon on the version number? Also shouldn't it be ^3.0 for the module version?
    – Kevin
    Commented Nov 10, 2018 at 21:05
  • @Kevin you are right I have also tried composer require drupal/coder:^3.0 with similar results. The wrong composer require drupal/coder ^8.3 was probably out of desperation. I don't remember where I picked it up. Thanks for the comment, I think I have found a way and I will post soon.
    – GiorgosK
    Commented Nov 11, 2018 at 8:55

2 Answers 2


What worked is the following commands

rm composer.lock
rm vendor -rf
composer clear-cache
composer require --dev drupal/coder
composer update

with last command perhaps not needed as the previous composer command does an implicit update


You should not really rm anything it is not required.

composer remove drupal/coder composer require --dev drupal/coder

Also for a bonus point it's often a good idea to include the hash in the composer file incase an unstable dev is released you won't have to worry about changes that have come after.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.