ORM type map details With the help of the Setup plugin you can get a lot of useful info for your current app setup. One very new useful overview is the ORM type map. It shows the different types and…
Simple local dev env for (Cake)PHP apps
The last years I was using devilbox a lot. It has quite a simple setup for CakePHP apps, that are not using too many different external services. Over the years that got less maintained. I started to also look into…
CakePHP and static analyzers
In this post, I discuss the usefulness of clean coding and static analyzers used to introspect it. I will also outline a few neat tools and tricks to get there faster. Static Analyzers Statically analyzing your code can be super…
CakePHP background processing
The easy way 🙂 Some might also already be in the #CakePHP coding world for some time. They might remember an article from like 11 years ago: queue-deferred-execution-in-cakephp. If not, maybe catch up on that one first, as that is…
Upgrading MySQL 5 to 8
Are you planning to upgrade an existing app and DB from Mysql 5 to 8 any time soon? Well, if you do, maybe you want to read the next paragraphs. I had to do it, and let me tell you:…
Enums in CakePHP – reloaded
If you have been in the Cake ecosystem for a while, you might remember my 13+ year old blog post about how to work with enums in CakePHP the easy way. I have been using them heavily for all my…
Templating and Icons in CakePHP
There is a new plugin on the block: Templating Check it out. PS: This is a direct successor of www.dereuromark.de/2022/12/19/font-icons-in-cakephp-apps. So all of the functionality around icons is directly ported, as well. Please read that article for some history on…
Improved Paginator for CakePHP
The default paginator throws a 404 on "OutOfBounds", so when you happen to access the pagination with a too high page number. What can be the issue with this? So first: This is not very user friendly. Often times this…
Database migration tips for CakePHP
CakePHP uses Phinx by default. The following tips will help with larger and legacy projects to maybe clean things up. Migration file count Problems If your migrations piled up over the years, and you have like hundreds of migrations, maybe…
Working with decimals in PHP apps
DB Basics Let’s talk about some of the basics first. float vs decimal In general, floating-point values are usually stored as float in the database. In earlier versions of databases they also often had precision/scale (e.g. float(5,2) for values like…