PHP doesn’t support explicit type definition. This is annoying, especially when doing meta programming. Various libraries including but not limited to Doctrine ORM and the Symfony Validator provide their own type managing system. Another common way to describe type(s) of a property is integrated documentation aka PHPDoc. The PHP Property Info library extracts various information including…
Category: Programming
Slides à propos des Linked Data et des API REST Hypermedia avec Symfony
Hier j’ai présenté certains de mes travaux autour des Linked Data et de Symfony au sfPot de Lille. Voici la présentation que j’ai projetée : voir les slides en plein écran.
sfPot à Lille sur Docker et le web sémantique avec Symfony
Alexandre Salomé (SensioLabs) et moi (Les-Tilleuls.coop) animeront un nouvel apéro Symfony à Lille le 15 janvier. Au programmes deux talks : L’un sur le web de données avec Symfony ou seront évoqués les APIs REST, l’hypermedia, Schema.org, PHP Schema et HydraBundle. L’autre sur Docker ou l’on parlera… de Docker ! Tout cela arrosé de bières belges. Rendez-vous le…
Generate a Symfony password hash from the command line
There is an easy way to generate a Symfony compliant password hash from the command line. Assuming you’re using the bcrypt algorithm (the preferred choice according to Symfony’s security best practices), the default cost (13) and you have PHP >= 5.5 installed, just run the following command: php -r “echo password_hash(‘ThePassword’, PASSWORD_BCRYPT, [‘cost’ => 13]) . PHP_EOL;” It will…
CoopTilleulsOVHBundle: OVH SDK integration in Symfony
I’ve just released a new tiny open source bundle under the Les-Tilleuls.coop umbrella: CoopTilleulsOvhBundle. That bundle integrates the official PHP SDK provided by OVH and exposes it as a Symfony service. It also provides a convenient way to store API credentials in parameters.yml. The OVH API provides a lot of features including dynamic server management (elasticity)…
“Persistence in PHP with Doctrine ORM” eBook for $5 until January 6th 2015
Thanks to Packt’s eBook Bonanza, my book “Persistence in PHP with Doctrine ORM” is available for only $5 until January 6th. Enjoy it! What you will learn from this book Install Doctrine through the Composer dependency manager Configure Doctrine Command Line Tools Learn to manage relations between entities with different association types Create data fixtures,…
PHP Schema: generate a fully functional PHP / Doctrine / Symfony data model from Schema.org vocabulary in minutes
PHP Schema is a code generator that instantly generates a PHP data model from the Schema.org vocabulary : browse Schema.org, choose the types and properties you need, run our code generator and you’re done! You get a fully featured PHP data model including: A set of PHP entities with properties, constants (enum values), getters, setters, adders and…
PHP 7: Introducing a domain name validator and making the URL validator stricter
DNS comes with a set of rules defining valid domain names. A domain name cannot exceed 255 octets (RFC 1034) and each label cannot exceed 63 octets (RFC 1035). It can contain any character (RFC 2181) but extra rules apply for hostnames (A and MX records, data of SOA and NS records): only alphanumeric ASCII characters and hyphens are allowed in labels…
Continuous Integration for Symfony apps, the modern stack: quality checks, private Composer, headless browser testing…
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…
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…