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…
Author: Mark
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…
Templated emails in CakePHP
Quite a few years ago I wrote small wiki note about templated emails and inline images/CSS. I never really got around to blog about it, let alone covering the 3.x version of it. There was a ticket opened recently regarding…
CakePHP and connecting to GitHub API
I had to write a small tool to automate releasing certain GitHub repositories, and for that to authenticate I had to connect to GitHub API. The integration wasn’t super-easy as there was no documentation yet on how this could be…
CakePHP Tips Fall 2016
Always use proper version check method Be aware of version checks that are using the inferior and even wrong </> comparison. This can lead to wrong conditions with higher minor versions. I had this in my code from the early…