Test composer dependencies with prefer-lowest


This 4 year old post already blogged about it. Surprisingly many libraries still don’t use it in their CI system yet. The –prefer-lowest option has been added around that time. Composer documentation says: "Useful for testing minimal versions of requirements"….

CakePHP 3.7 and PHP 7.3


What a timing! Soon both these minors will land as stable versions. CakePHP 3.7 Let’s talk about this minor first. RC-2 has just landed. The changelog towards master (3.6) shows, that the changes are not too much, it is basically…

Tutorial: CakePHP & Tagging


This article mainly shows the power of a Rapid Development Framework like CakePHP. The full plugin documentation can be found directly in the repository. Let’s imagine we have some blog posts in our database and we need to quickly add…

Middleware and CakePHP


I started to migrate some of my CakePHP 3.x apps to CakePHP 3.3 middleware and even tested 3.4 already back in 2016. Until then I didn’t even try the new PSR7 way. But it was about time I caught up…

CakePHP 3.6 is coming


The first betas have landed already. Make your plugins and apps 3.6-ready now. It is actually rather easy – better to be proactive now and have a small migration path than a big fallout and some surprises in a few…

CakePHP Tips 2017 Part 1


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


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…

Emoji and CakePHP


You might think: Why do I care. Well, you would be surprised – but pretty much any website with at least one form on the page will be affected here. So anyone with even just a basic contact form should…