You never want a user to see that your web site is broken or appears not to be working. This generally happens when you have to make certain kinds of updates to your site, for example, modifying the database. Therefore, through the CLI, you can disable an application as well as an environment by using the Symfony disable
task. First, we must enable Symfony to check for a lock file. This file is created once we have disabled the applications. In our settings
file located at apps/frontend/config/settings.yml
, add the following:
dev:
.settings:
no_script_name: on
logging_enabled: off
check_lock: on
Now, we can disable our application using the Symfony task, as follows:
>symfony project:disable frontend dev
Once you have executed this command, all the URLs are routed to the unavailable action in the Symfony's default module. The following screenshot shows the default unavailable page that is shown if we try to access our dev...