From the course: Symfony 6 Essential Training

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Using config files

Using config files

- [Instructor] Symfony allows for project specific configurations. You won't need to modify them often once set up, but it is important to understand how Symfony uses config. In the root of the project is the Config folder. This is an empty project installed with the web app flag. Of note, this path has both YAML files and PHP. Symfony config files can be YAML, PHP, or XML. YAML is used by default, but all three are interchangeable. Symfony transforms and caches all three so there is no performance difference between them. Here's an example services.yaml file. Under the Defaults section, you can enable autowire and autoconfig. I'll get to what that means in a future video. For now, you just need to be comfortable with the shape of config files. I've added a services.php file as an example of how you could create the same values in PHP instead of YAML. You definitely don't need or want both. When you're developing an app,…

Contents