Who is this article for? This post is for people that do day-by-day busywork coding, and for team leads that want to direct their peers towards better logging practices. Note that this article comes from my regular need to present these exact points to different people, multiple times a year, in multiple teams, in multiple companies. Also, we will not talk about how to configure a PSR-3 logger,…
I'm back! The last time I blogged was in 2017: a lot has changed since then, and after a decade of ignoring blogging, I will attempt to put some regularity into it again. The times call for it: having a personal space that is really " our own " is extremely important, and it is as important as having something to read that is written by other humans, and not slop. I mainly stopped blogging for two…
Roave 's BetterReflection 2.0.0s was released today! I and James Titcumb started working on this project back in 2015, and it is a pleasure to see it reaching maturity. The initial idea was simple: James would implement all my wicked ideas, while I would lay back and get drunk on Drambuie. Yes, that actually happened. Thank you, James, for all the hard work! 🍻 (I did some work too, by the way!)…
Today we're talking about Visual debt in our code. As an introduction, I suggest to watch this short tutorial about visual debt by @jeffrey_way . The concept is simple: let's take the example from Laracasts and re-visit the steps taken to remove visual debt. interface EventInterface { public function listen(string $name, callable $handler) : void; public function fire(string $name) : bool; } final…
I've been using a YubiKey Neo for a bit over two years now, but its usage was limited to 2FA and U2F . Last week, I received my new DELL XPS 15 9560, and since I am maintaining some high impact open source projects, I wanted the setup to be well secured. In addition to that, I caught a bad flu, and that gave me enough excuses to waste time in figuring things out. In this article, I'm going to…
Some time ago, I was asked where I put I/O operations when dealing with aggregates. The context was a CQRS and Event Sourced architecture, but in general, the approach that I prefer also applies to most imperative ORM entity code (assuming a proper data-mapper is involved). Scenario Let's use a practical example: Feature: credit card payment for a shopping cart checkout Scenario: a user must be…
ProxyManager 2.0.0 was finally released today! It took a bit more than a year to get here, but major improvements were included in this release, along with exclusive PHP 7 support. Most of the features that we planned to provide were indeed implemented into this release . As a negative note, HHVM compatibility was not achieved, as HHVM is not yet compatible with PHP 7.0.x-compliant code. As of…
PRE-REQUISITE: Please note that this article explains complexity in internal ORM operations with the Big-O notation. Consider reading this article , if you are not familiar with the Big-O syntax. What is hydration? Doctrine ORM, like most ORMs, is performing a process called Hydration when converting database results into objects. This process usually involves reading a record from a database…
TL;DR : Make your classes always final , if they implement an interface, and no other public methods are defined In the last month, I had a few discussions about the usage of the final marker on PHP classes. The pattern is recurrent: I ask for a newly introduced class to be declared as final the author of the code is reluctant to this proposal, stating that final limits flexibility I have to…
Today I finally released version 1.0.0 of the ProxyManager Noticeable improvements since 0.5.2: Windows path length limitations are now mitigated Proxy classes are now re-generated when the library version changes Documentation has been moved to github pages (Markdown documentation will be kept in sync) It is not possible to trigger fatal errors via code-generation anymore Planned maintenance…