24 articles Symfony Page 2 / 5

Fabien Potencier is a mad genius, he’s the man behind Sensio Labs and the Symfony PHP framework, which I have grown to really appreciate. For one, any business with a web development team needs to be on a framework. Period. Collaboration will improve exponentially while development time will decrease as your systems become more stable and scalable. PHP frameworks are a necessity for any company with serious skin in the web!

Looking for a PHP developer, a Symfony expert or Wordpress web developer? Perhaps a business system architect that specializes in scalable MySQL business system design and deployment? We have reliable, fast and professional developers that meets your organization’s needs! Contact us for your next web development project and schedule a free consultation today.

PHP Symfony: Access the internationalization “locale”

In your controller, you can access the special global "_locale" variable from the Request object:  

Accessing cookies directly in your Symfony Twig views

In Symfony, cookies are stored in the app.request object. Here's how you access them in Twig: To see if a cookie is set, use the if statement inside Twig:

Symfony setting, adding or intercepting the public request object

In Symfony, you can alter the public request attribute from the $request object and set or add parameters. Example: You can also add new form fields and values with ->add:

Symfony & Doctrine: Using try… catch to determine success or failure of database insert or update action

In Doctrine, there is no simple way to access the Doctrine object and get the status of the last attempt at inserting or updating the database. To overcome this glaring limitation of the DBAL (Database Abstraction Layer), we have to resort to older PHP techniques like using a try... catch condition. Seems like a lot…

Symfony and the occasional need to rebuild the “Bootstrap Cache”

If your server crashed or old files were restored by accident, or some files got corrupt (you know how that can sometimes happen), your website might experience some glitches, or worse, the dreaded "Server 500 Error". If you are running Symfony and experiencing errors that are not typical, you might need to rebuild the bootstrap.cache.php…