CakePHP 3.7 and PHP 7.3

0

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

0

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

3

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

1

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

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…

Emoji and CakePHP

0

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…

CakePHP Tips Fall 2016

0

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…