Closed thomscode closed 6 years ago
Hi @thomscode,
Thanks for reporting. We are using the default Syfmony container as a configuration tool for this project. This is just how the Symfony container merges config. There isn't really anything we can do about this.
You might want to create a grumphp extension instead which gives you full control over the container. More info about extensions: https://github.com/phpro/grumphp/blob/master/doc/extensions.md
The format as described in the conventions document is assuming that you do not add new tasks in sub projects but in the convention file instead.
My company develops and hosts several Drupal sites, which we are starting to manage with Composer. To help with checking files, I setup a base GrumPHP configuration to share across projects and am using the
imports
key to import that into the project so I can continue to customize the settings as projects have need to do so. I set this up per the "convention" instructions in the DocsThe shared configuration contains task settings. If I try to overwrite the settings for any given task, GrumPHP overwrites the entire
tasks
key (possiblyparameters
too).My shared configuration
My configuration
Steps to reproduce:
grumphp.yml
filegrumphp.yml
file (import part of second config above)grumphp run
jsonlint
andyamllint
tasks to maingrumphp.yml
filegrumphp run
jsonlint
andyamllint
tasks runExpected: I would have expected that the two configurations would have been merged and not that the second would overwrite the first.