PHP 5.3 - End of Life statistics

PHP 5.3 met its end-of-life in August 2014. It's been a good run for the most popular 5.x version (given by the several breaking changes introduced in PHP 5.4). How did the PHP 5.x universe looked a year ago? (using data from here as well as…

#Tags: php, webdev, PHP

Doctrine 2 + annotations and opcache

I can't describe how much I hate annotations in PHP. Rather than annotations, I would take yml over them anytime. Especially since opcode cache doesn't save them, making Doctrine freak out. Yet there are times when one has to be subjected to the annotation atrocity so here's a fix that…

#Tags: symfony2, php, PHP, doctrine

Replace tabs by spaces

I learned something new today: find . -name '*.php' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; Of great help to those who want their code to become PSR2 compliant. Works best in Linux but also under Git Bash…

#Tags: php, linux, PHP, git, psr2

Continuous Integration for PHP

Continuous integration for PHP projects is definitely a thorny subject, from my point of view. Why? Because the vast majority of continuous integration tools have a few drawbacks: they are behemots: consider Jenkins CI and/or its parent Hudson. Designed in Java, for huge Java projects, they are resource hungry…

#Tags: development, php, continuous integration, PHPCI, PHP

Integrating Elasticsearch in Symfony2

A great tutorial on integrating Elasticsearch in Symfony2 with FOSElastica. And a more complete look on Elasticsearch with Symfony2.…

#Tags: programming, elasticsearch, symfony2, php, autocomplete, PHP

Using a CDN with Symfony2 assets and Twig

After a bit of research, I've managed to discover how to use a CDN with Symfony2 and the Twig template engine using the Symfony2 proper way. Until now I've had to hardcode stuff and use other workarounds. Hopefully this will help someone in the future. framework: templating: engines: ['twig'] assets_…

#Tags: programming, symfony2, php, web programming, webdev, PHP