symfony3 Include all configuration files from a directory


After a while, you end up with many configuration items in your config.yml. It can make you configuration easier to read if you split your configuration across multiple files. You can easily include all files from a directory this way:


    - { resource: parameters.yml }
    - { resource: "includes/" }

In the includes directory you can put for example doctrine.yml, swiftmailer.yml, etc.