Encapsulate Reserved Words in Doctrine 2 Entities

When dealing with legacy applications and moving them to Doctrine (or any ORM), you will undoubtedly encounter poorly named columns and tables in need of migration. Unfortunately in the case of Doctrine 2, the default behavior for SQL query generation fails to encapsulate the column names properly, causing syntax errors with column names like “delete”. […]


DebugBar Second-Level Cache Collector

This will add a collector to handle Doctrine’s second-level cache and display basic information on puts, hits and misses on your PHP DebugBar. Then instantiate the cache logger, set it to the cache config and add it to the new collector.

Cannot declare class, PHP?!?

One of the most annoying errors to debug when working with a litany of autoloaders using required instead of include_once in PHP: PHP Fatal error:┬áCannot declare class SomeClass, because the name is already in use in /somewhere/SomeClass.php on line 1234 What makes it annoying is the lack of a trace. You know it was only […]