You are browsing the Symfony 4.0 documentation, which changes significantly from Symfony 3.x. If your app doesn't use Symfony 4.0 yet, browse the Symfony 3.4 documentation.
Configuration usually involves different application parts (such as infrastructure and security credentials) and different environments (development, production). That's why Symfony recommends that you split the application configuration into three parts.
The name of your configuration parameters should be as short as possible and should include a common prefix for the entire application.
app. as the prefix of your parameters is a common practice to avoid
collisions with Symfony and third-party bundles/libraries parameters. Then, use
just one or two words to describe the purpose of the parameter:
1 2 3 4 5 6 7 8 9 10
# config/services.yaml parameters: # don't do this: 'dir' is too generic and it doesn't convey any meaning app.dir: '...' # do this: short but easy to understand names app.contents_dir: '...' # it's OK to use dots, underscores, dashes or nothing, but always # be consistent and use the same format for all the parameters app.dir.contents: '...' app.contents-dir: '...'
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.