Skip to content

Articles from Benjamin Grandfond

Manage PHP errors and exceptions in your project

April 11, 2014Benjamin Grandfond7 min read

During application development, developers have to handle errors in the execution flow. PHP, among many other languages, allows you to do so but since I recently stumbled upon a really bad way to do it I thought that reminding the basics would not hurt. Errors or Exceptions PHP makes a distinction…

Continue reading →

De retour du Symfony Live Paris 2014

April 09, 2014Benjamin Grandfond2 min read

This blog post is in French as the event it relates to is French-only. De retour du Symfony Live Paris 2014 Ces lundi et mardi nous étions au sixième Symfony Live Paris qui se tenait à la Cité Internationale Universitaire de Paris. Theodo y était Sponsor Gold et, si vous y étiez, vous avez…

Continue reading →

Adoptez le TDD sur vos projet Symfony2 existants

August 21, 2013Benjamin Grandfond1 min read

This blog post is in French as the event it relates to is French-only. A l'occasion du Symfony Live Paris 2012, j'ai eu la chance de pouvoir faire une présentation où j'explique comment faire du Test-Drivent Development (TDD) dans un projet Symfony2 dont les slides sont disponibles sur speakerdeck…

Continue reading →

How to manage fixtures in a PHP project

August 08, 2013Benjamin Grandfond5 min read

Dealing with data developing a new application is a real challenge for the development team. You often need them to develop and then test your app. For example, for a login system, you would need different users with roles and permissions in the database in order to test that the configuration is…

Continue reading →

First steps with Behat

April 10, 2013Benjamin Grandfond9 min read

Warning: This blog post uses Behat 2.5. It is not all compatible with the ~3.0 version which should be released on 20th of April 2014. At the beginning of the year, I decided it was time to give a try to BDD. Hence every new project I started from then on was done with BDD. I found at the time lots…

Continue reading →

Don't overuse dependency injection

February 20, 2013Benjamin Grandfond4 min read

The other day, I stumbled upon the following code that I wrote a few days before. Here is the service definition in the FooBarBundle. The usage of this class is really simple: you call the method getFiles of the service in any part of your application an you'll get an array of files. Here is an…

Continue reading →

Back from Berlin

December 13, 2012Benjamin Grandfond3 min read

Two weeks ago most of the development team was at Symfony Live in Berlin. It was a pleasure for all of us to be there, meeting core team devs, talking with other Symfony user, seeing Fabrice on stage, speaking about Theodo Evolution with people with similar issues and hacking on TheodoRogerCmsBundle…

Continue reading →

Paris-Devops meetup 10 Octobre chez Theodo

October 04, 2012Benjamin Grandfond1 min read

This blog post is in French as the event it relates to is French-only. Pour lancer la saison 2012-2013 des meetups Paris-Devops, Theodo organise la 10ème rencontre des devs et des ops dans ses nouveaux locaux le 10 octobre 2012. Orienté plutôt langage, la thématique de ce meetup sera PHP-Python-Ruby…

Continue reading →

Theodo is growing!

September 03, 2012Benjamin Grandfond1 min read

When I started working at Theodo, in october 2009 (indeed, nearly 3 years ago :)), we were 6 people. Now, Theodo is an awesome team of 20 theodoers[1], each with a different profile (still working hard ;)), and many more will be coming in the next months. Our current office, at Rue Notre Dame des…

Continue reading →

Theodo at Forum PHP and sfLive in Paris next week

June 03, 2012Benjamin Grandfond1 min read

The upcoming week will be really busy as two main conferences for the french PHP community will take place in Paris. First the Forum PHP organized by AFUP from Tuesday to Wednesday at Cité universitaire. Going there you will meet many French PHP experts and among them Theodo which sponsors the event…

Continue reading →

Symfony2 unit database tests

September 30, 2011Benjamin Grandfond5 min read

Today I will explain how to test your entities in a Symfony2 and Doctrine2 project. To achieve our work, we will work on a location model which will look somewhat like this: Location: address: string, required zip code: string, required city: string, required country: string, required Test Driven…

Continue reading →

Get objects and related count in one shot

July 29, 2011Benjamin Grandfond3 min read

Sometimes you just need to output the number of objects related to another, but this simple operation can be a major blow performance-wise. I hope this trick I use a lot in my symfony + doctrine developments will save you some time. Let's consider a blog that allows you to tag your posts: You can…

Continue reading →