Blog




1st March 2018

Creating a theme system with Twig and Symfony

What’s Twig If you use Symfony you also probably use Twig (http://twig.sensiolabs.org/). It is a very flexible layout system and it makes it really easy to: extend a base layout include external sublayouts Even though Twig requires you to learn a slightly different syntax, I feel it’s well worth it and I am completely happy with it. Let’s take a […]
21st November 2017

How I tamed a complex DB structure with an index service

So, I had to build an API layer on top of an existing legacy (but well-known) codebase. Sounds easy, huh? Yep, that’s what I thought, too. Unfortunately, things were not that easy: as I started going into details, I found a few traps.
11th July 2017

Connect to MSSQL from Linux Ubuntu with Symfony and Doctrine

tl;dr Install the php5-sybase package This will install on Ubuntu the drivers required to connect to a Microsoft SQL Server. Test connection from PHP We want to make sure PHP is working before moving on to Doctrine. See below for a sample test PHP script. Install the leaseweb/doctrine-pdo-dblib bundle Doctrine out of the box does not support connecting to a […]
5th April 2017

Symfony template locations: questioning the best practice

A while ago the Symfony project published a “Best Practices” book. This is a source of excellent suggestions and it’s written by the people who wrote Symfony in the first place, so we decided to stick to it as much as possible, even in those few cases where the benefits where not immediately clear. But after a few more Symfony […]
30th January 2017

Symfony and Monolog: define a custom logger file at runtime

Monolog Monolog is a logging library. It is extremely powerful and most of the time only a tiny subset of its features are actually used. Just to mention a few extra features: we can define different and complex logging strategies to keep only really interesting stuff we can define to send our log to DB, to mail, to webservices we […]
13th September 2016

Symfony assets management: assetic:dump

I recently wrote about the assets:install command, but there’s a more interesting way to handle your assets: Assetic.
5th May 2016

Symfony assets management: assets:install

In your Symfony application there are bound to exist many assets (JS, CSS, and so on) either created by you or provided by third-party bundles. As part of your deploy procedure, you usually have to use some Symfony console command to actually make the assets available to the frontend of your application. Let’s start with the most basic solution: the […]
14th February 2016

Symfony parameters list

The Symfony parameters files are very neat but you should know how to use them. Let’s focus on how to keep track of the full list of your application parameters.
30th November 2015

Install Symfony app in a subfolder of an existing site

The request was simple: one of my customer wanted to have a Symfony app available as a subfolder of an existing site, i.e. http://www.example.com/myapp/ Googling for it, I found lots of tutorials but each one of them failed to meet two specific requirements: I don’t want to edit the virtual host configuration the application folders (“app”, “bin”, “src”, “vendor”) must […]
We are hiring!