Configuring Symfony
In order to keep up with modern demands, today's frameworks and applications require a flexible configuration system. Symfony fulfils this role nicely through its robust configuration files and environments concept.
The default Symfony configuration file config.yml
is located under the app/config/
directory, with (partial) content sectioned as follows:
imports: - { resource: parameters.yml } - { resource: security.yml } - { resource: services.yml } framework: … # Twig Configuration twig: … # Doctrine Configuration doctrine: … # Swiftmailer Configuration swiftmailer: …
The top-level entries like framework
, twig
, doctrine
, and swiftmailer
define the configuration of an individual bundle.
Optionally, the configuration file can be ...
Get Modular Programming with PHP 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.