Primitive obsession anti-pattern
Unit testing Twig's Lazy Extensions
Efficient Twig extensions using Lazy Extensions
Lazy Twig extensions were introduced in Twig 1.35 / 2.4.4, albeit there’re still see so many Symfony apps that don’t use them.
How to enable Twig template autocompletion with Symfony integration plugin in phpStorm
The plugin currently is lacking support for the new Symfony’s directory structure
since we keep Twig files in the templates/
directory.
How to configure Symfony 4 Doctrine XML mapping
I’ve attempted to answer this question lately on StackOverflow. Astoundingly, the documentation is scarce about this.
Conditional Xdebug breakpoints in phpStorm
How many times did you modify that big loop of yours just to make phpStorm enter a debugging session in the right place at the right time?
Generate UUID v6 in PHP
The RFC 4122 describes five versions of UUID, but none of them is optimized to be used as a primary key in a relational database we are so fond of.
Dockerized MySQL hot backup tool with Percona Xtrabackup
Just created a dockerized tool that wraps Percona Xtrabackup binary and periodically does a hot backup of your MySQL/MariaDB database. I already use it on production and it works like a charm! Feel free to use and/or contribute. Licensed under MIT so anyone can use.
Conway's Game of Life implementation in PHP
It’s really enjoyable sometimes to lay your daily activities and do anything fun topic. I managed to find some spare time recently so I got my hands on Conway’s Game of Life topic and did a simple implementation in PHP7.
How forms should be done in Zend Framework 2/3
Zend Forms are great and flexible, however, even the official documentation does not show how to make them properly. Too many times had I seen people having trouble creating simple forms or form elements. As the documentation is lacking and the number of real world examples on the Internet is scarce, I have released a Zend Framework 3 playground app.
Using Value Objects as entity ID in Doctrine
It’s really easy to apply DDD style ValueObject UUID ID’s in your Doctrine entities with custom Doctrine types and my tiny helper class available at Github.