Fernando CastilloPhp and Postgres team up to optimize multi-insertsIn some scenarios you need to insert more than one row in a table. Maybe in more than one table. Typical techniques require sending a…6h ago6h ago
Fernando CastilloPlease don’t: over complicating array translation in PHPThis code example based on a real case shows an attempt to solve a problem in a way that appears to anticipate a complication that wasn’t…Aug 8Aug 8
Fernando CastilloPostgres: type casting for writing better queriesA cast in Postgres is a specification of a conversion between two types. Postgres packs some casts out of the box, like converting integer…Aug 4Aug 4
Fernando CastilloFactory Pattern can encapsulate complexity in PHPSometimes I hear comments against the Factory Pattern, meaning that it just introduces complexity with no real value, and I want to explore…Jun 9Jun 9
Fernando CastilloExtend your Symfony Console app with events and attributesYou can easily build a console application using the Symfony Console component, but did you know that you could extend it just as easily?Jun 1Jun 1
Fernando CastilloValue Objects in PHP can protect you from bad dataOne of the things that we need to care about when working with object oriented programming is that the data we are working with is valid at…May 193May 193
Fernando CastilloProgramming InertiaA property of matter by which it continues in its existing state of rest or uniform motion in a straight line, unless that state is changed…Apr 5Apr 5
Fernando CastilloSymfony Form: use the Type Class as DTOWhen working with Symfony forms, you may need the data in a DTO instead of an Entity. Maybe for that form you need to send a request to an…Mar 31Mar 31