CakePHP Tips 2017 Part 1

3

Whoops as ErrorHandler I recently switched to Whoops in my apps. It provides a better exception rendering for development mode for most cases. Just load the plugin (dereuromark/cakephp-whoops) and modify the bootstrap line: //(new ErrorHandler(Configure::consume(‘Error’)))->register(); (new \CakephpWhoops\Error\WhoopsHandler(Configure::consume(‘Error’)))->register(); If you already…

CakePHP Tips Winter 2016

2

This is literally my last blog post for the year 2016 🙂 Use the right DateTime typehint If you are passing DateTime objects around in CakePHP, they are usually Chronos objects, and either \Cake\I18n\Time or \Cake\I18n\FrozenTime then. Both those are…

Continuous Integration with Jenkins

0

CI with Jenkins and GitHub is especially interesting for private repositories, as CI with Travis is mainly for free GitHub repos (unless you have Travis Pro, of course). But since Jenkins is OpenSource and free, it might make sense to…

CakePHP Tips – Summer 2013

2

While CakePHP 2.4 is now just around the corner (already beta), a few tips gathered the last few days. Don’t mix controller and component pagination Currently, if you mix controller pagination setup and call the Pagination component then, it can…