I'm trying to create a development enviroment for the frontend developers. As long as they don't change any php code I thought it might be a good idea do this, if possible:
Is there any way to do this? I'm not sure if it's possible
You can create as many environments as you want. After all, environments are just sets of different configuration, nothing more.
This means that if you want to create a frontend
environment, you have to do just some things:
AppKernel
using new AppKernel('frontend', false);
AppKernel::registerContainerConfiguration()
in the Symfony Standard Edition uses the environment to determine the config file to load, you have to create app/config/config_frontend.yml
as well (or change the logic in the AppKernel
method)Inside this config file, make sure you import the settings that are in common. This often means importing app/config/config.yml
. Besides that, you can configure things how you like it. E.g.
# app/config/config_frontend.yml
imports:
- { resource: config.yml }
twig:
cache: false
You can read more about this topic in the Symfony docs.