wikimedia / composer-merge-plugin

Merge one or more additional composer.json files at Composer runtime
MIT License
934 stars 159 forks source link

require-dev and autoload-dev should be objects, not arrays #134

Closed grasmash closed 7 years ago

grasmash commented 7 years ago

When merging in a composer.json file that includes autoload-dev and/or require-dev, composer-merge-plugin will create an empty array for these keys in the root composer.json. This causes composer to throw a fatal error:

  [Composer\Json\JsonValidationException]                         
  "./composer.json" does not match the expected JSON schema:      
   - require-dev : Array value found, but an object is required   
   - autoload-dev : Array value found, but an object is required  

The stubs should be created as empty objects rather than empty arrays.