Preparing an application
There are a few steps that you should consider while preparing your application for production. It usually involves the following steps:
- Checking the code against debug variables or functions.
- Customizing error pages.
- Verifying the production server requirements.
- Verifying the application against known framework security issues.
- Updating the basic assets and metadata.
Let's discuss the preceding points.
Checking the code against debug code
Often, when you create your app, you are adding various debug codes to help you with debugging. Before deploying your work, it is important to verify how Symfony2 will behave in the production mode. Let's run our application and verify this. To run a built-in server in the production mode, execute the following:
$ php app/console server:run --env=prod
Now, when you run your app in the browser, you will notice that it doesn't have a web developer toolbar anymore, although the login page looks normal as usual. Let's...