This post describes steps required to enable logging in Symfony project in production enviroment.
By default logging is disabled in prod enviroment, and if you want to enable it, you need to edit settings.yml and factories.yml files in your app directory.
Author: tomislav
Getting current route name from template in Symfony
Posted on Category:PHP, MySQLWhen creating webpages with navigation and menus, it is often nessesary to assign css class for menu item that the visitor is currently viewing. This post shows an example how to get current route name from a template for that purpose.
Symfony form conditional validation with PostValidators
Posted on Categories:PHP, MySQL, SymfonyThis post describes how to use Symfony postValidators to create conditional validation of the form.
In this example I’m checking for user_type variable that can be set to person or firm value. If variable user_type has value person, the form should have one set of required fields, and another set for value firm.