Blog

When it comes to ORMs in PHP, Doctrine is one of the most common libraries and for many developers the first choice for their projects. A Symfony Framework standard installation already has Doctrine as a dependency by default and it can be easily added to other frameworks like Laravel or Zend. While working with a simple CRUD, a developer doesnt even have to think about which database is actually behind the ORM, but...
Finding the right index to a SQL query is not only important for performance improvements, it is also relevant to reduce the memory on disc for every created index of every table of the projects databases. Sometimes there are multiple indices on one table, that can be covered with only one smart index, which can improve INSERTS too. The right index is a guarantee for fast reads without slowing down writes too much...
A new PHP project for a web application starts with some simple dependencies a webserver, maybe a database and of course PHP. For that, we need a good workstation, Apache or Nginx and as a database like usually MySQL. Surely some choose MariaDB or PostgreSQL, others a non relational database like MongoDB. Most of us started with LAMP or WAMP for the first time and switched later to a development...
When it comes to test doubles in unit tests, mock objects are the common way to replace a dependency in a tested unit. Most of us started to test PHP code with the testing framework PHPUnit that is shipped with its own mocking library. Even though it already offers a lot of possibilities to replace dependencies in unit tests, many other new innovative mocking libraries were released over the last years offering more...