fbpx

Categoria PHP

Upgrading to Composer 2

The new major version of Composer has been available since the end of October 2020 and was announced with this post on the Packagist blog. Let’s see the most relevant improvements and how to upgrade to the new version. Performance…

Composer conflict, how can we use it?

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…

PHP tip: array_diff an array of objects

That’s tricky! Let’s assume we have two arrays like these: [crayon-60783b88621bf437539936/] 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: [crayon-60783b88621c2169299938/] This happens…