TIL Week 9 2022
A roundup of the things I learned in the 9th week of 2022.
Technical
- Doctrine doesn’t escape column names so you shouldn’t use a MySQL reserved word as a column name.
- To view the SQL you’re trying to run in Doctrine you can set a logger
$debug = new DebugStack(); $em->getConnection()->getConfiguration()->setSQLLogger($debug); // Do queries in try catch print_r($debug->queries);
Professional
- Always test as close to production as possible. Because
interval
is not a reserved name in SQLite, but is in MySQL the Doctrine column name issue in Technical would have slipped through CI and caused production to break. This is because our test environment was using SQLite.
Personal Notes
- When work informs you that Coronavirus is over and they’re no longer going to provide support to parents, and at the same time your kid is home for 2 weeks because of a Coronavirus outbreak in his kindergarten it is incredibly demotivating.