Today I found a very useful Composer schema package link option named conflict, which is useful when third-party code you rely on is too permissive for your needs. At the time of writing, the conflict man page states Lists packages that conflict with this version of this package. They will…
In Madisoft utilizziamo da sempre le buone pratiche per la gestione delle nostre infrastrutture. Abbiamo sempre pensato che il cloud fosse la scelta giusta per i nostri servizi, ma soprattutto eravamo certi che gestire la nostra infrastruttura come codice, ci avrebbe rallentato leggermente nelle fasi iniziali dei nostri progetti, ma…
The Cascade is a fundamental element of CSS: it means that in order to fully understand how an element will be rendered, a developer should be aware of how weight, specificity, and order will affect the process. In presence of multiple rules competing for the styling of an element, the…
Simple Storage Service – S3 is one of the first services created by Amazon AWS, and it is also one of the most popular. Its simplicity has determined its great success. In addition to the most commonly used functions or methods of use, there are some functions or features that…
This article describes, from an infrastructural point of view, how to use together the doctrine sharding and Amazon Aurora Autoscaling, on our databases. Nuvola is our main project, which allows Italian schools to manage their activities in a computerized way. Nuvola is a multi-tenant application. In the past we have…
That’s tricky! Let’s assume we have two arrays like these:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
class Foo { public $bar; public $flag; public function __construct(string $bar, bool $flag) { $this->bar = $bar; $this->flag = $flag; } public function __toString(): string { return $this->bar; } } $array1 = [ new Foo('test', true), ]; $array2 = [ new Foo('test', false), ]; |
Looking at these few lines I would expect that those two arrays are different but if we compare them with php array_diff function they’re the same:
1 2 3 4 |
var_dump(array_diff($array1, $array2)); array(0) { } |
This happens because array_diff compares array elements as string so it calls the __toString…
Una delle tecnologie più recenti e più promettenti è quella della blockchain(Attenzione alla “B”, con la maiuscola si fa riferimento alla Blockchain di Bitcoin, con la “b” minuscola alla tecnologia blockchain dove l’asset di riferimento non è necessariamente il Bitcoin). In questo breve articolo non vi descriveremo, in modo dettagliato,…
The usual way of defining a controller in a default Symfony installation is by placing it in the src/Controller directory, but there might be situations where you just don’t want to do that. For instance, if you’re using some sort of domain-driven design and want to organize your project according…