Articles from Benjamin Grandfond
Manage PHP errors and exceptions in your project
Benjamin Grandfond8 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…
Continue reading →De retour du Symfony Live Paris 2014
Benjamin Grandfond3 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.
Continue reading →Adoptez le TDD sur vos projet Symfony2 existants
Benjamin 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…
Continue reading →How to manage fixtures in a PHP project
Benjamin Grandfond6 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…
Continue reading →First steps with Behat
Benjamin Grandfond10 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…
Continue reading →Don't overuse dependency injection
Benjamin Grandfond4 min read
The other day, I stumbled upon the following code that I wrote a few days before. <?php // src/Foo/BarBundle/Manager/ReportManager.php namespace Foo\BarBundle\Manager;use Symfony\Component\Security\Core\SecurityContextInterface; use Symfony\Component\Finder\Finder;class ReportManager { /** * @var \Symfony\Component\Security\Core\SecurityContextInterface */ …
Continue reading →Back from Berlin
Benjamin Grandfond4 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…
Continue reading →Paris-Devops meetup 10 Octobre chez Theodo
Benjamin 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…
Continue reading →Theodo is growing!
Benjamin 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…
Continue reading →Theodo at Forum PHP and sfLive in Paris next week
Benjamin 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…
Continue reading →Symfony2 unit database tests
Benjamin 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, requiredTest…
Continue reading →Get objects and related count in one shot
Benjamin Grandfond4 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…
Continue reading →