Updated 2014/11/21 : Fixed a bug when deploying (thanks @meyer_baptiste). Added a command to update GitHub commit status (thanks @samuelroze). At Les-Tilleuls.coop, we built great e-commerce platforms and high-performance web applications with quality and agility in mind. Most of our applications share the same technical stack: the PHP language with the Symfony framework and Doctrine for back applications front applications developed with CoffeeScript or…
Category: PHP
Internationalized Domain Name (IDN) and PHP
Currently, PHP doesn’t have any native support of IDN: domains with non-ASCII characters such as http://www.académie-française.fr. If you try to connect to such site you’ll get nothing but an error: file_get_contents(‘http://académie-française.fr’); // PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in php shell code on line 1 RFC 3490 specifies that applications must convert IDN…
Enabling OPcache for PHP 5.6+ installed with Homebrew
Since 5.5, PHP comes with a built-in OPcache system. This PHP accelerator has been open sourced by Zend and is a good replacement for APC. If you installed PHP 5.6 on your Mac with Homebrew, you maybe noticed that OPcache is not enabled by default. Even if the extension has been compiled, a manual configuration must be done…
Les slides du premier sfPot (apéro Symfony) Lillois
Merci d’être venus assister en nombre au premier sfPot qui s’est tenu jeudi dernier à l’Autrement Dit. Nous y avons discuté de comment réaliser des applications web modernes architecturées autour d’une API REST réalisée avec Symfony et d’un client en JavaScript utilisant des frameworks tels que AngularJS et Backbone.js. Comme promis, voici les slides réalisées par…
PHP SocialShare 0.2.1 released
I’ve just published a new version of PHP SocialShare, a library allowing to retrieve server-side webpages’ number of shares and share link from social networks. This release fixes a bug that was breaking the Google support when the number of shares if greater than 1K and use the brand new phpspec 2.0 stable release as spec…
Le premier apéro Symfony lillois (sfPot), c’est le 20 mars
Jeudi 20 mars aura lieu le premier sfPot Lillois à L’Autrement Dit, 14 rue Royale, dans le Vieux Lille. Organisée par Les Tilleuls et Sensiolabs, cette soirée aura pour thème « Réaliser des applications innovantes avec Symfony 2″. Les sfPots, ce sont des rendez-vous informels autour d’un verre, destinés aux férus de Symfony, solution open-source permettant le développement d’applications évolutives, fiables, sécurisées…
Casting PHP types to string
Casting PHP types is not easier as it seems. Type juggling in PHP is not obvious. In Java variables can always be represented as strings, without throwing errors. This is not the case with PHP and I’ve not found the detailed behavior of string casting in the official documentation. Here it is. Scalar types (boolean, integer, float, and…
Using SocialShare with WordPress to create custom social networks buttons
2013/02/14: Take care of the smarter caching system introduced in version 0.2.0. Here is how to use the SocialShare PHP library to create custom Facebook, Twitter and Google Plus share buttons including the number of share. Installing the library The first step is to install SocialShare through the awesome Composer dependency manager. If you have…
Introducing the SocialShare PHP library
I’ve released a new PHP library allowing to retrieve the number of shares of URLs on popular social networks. It currently supports Facebook, Twitter, Google Plus / Plus One, Pinterest, LinkedIn and Scoop.it!. This library is also able to generate sharing links for these networks. The main advantages of this library over traditional JavaScript share…
Connection to a MS SQL Server from Symfony / Doctrine on Mac or Linux
Microsoft provides a SQL Server driver for PDO. Unfortunately, this driver only works on Windows. Linux and Mac OS X apps must use the FreeTDS compatibility layer: an open source implementation of the MS SQL Server protocol for Unix. It’s possible to connect a Symfony app to a SQL Server instance on Unix through FreeTDS but this involve to use a Doctrine…