What is everyone’s opinion on CakePHP 4?

I'm more curious as to what the state of Cake is. I last worked on a v2 app and it was nice if you want something clear and out of the way, but I haven't really touched v3.

Is the marketshare growing? shrinking? When I started almost a decade ago, Cake was what you learned if as your first framework. Do people still give that advice, or is it straight to Laravel now?

Lastly, the one thing I appreciated was the ease of setting up CRUD functionality. Did they keep that? I've only seen one other framework that was like that (maybe Yii2?).

5 thoughts on “What is everyone’s opinion on CakePHP 4?”

  1. I was going deep in ruby on rails when i started getting to the point where i needed to know a lot about rails to do the things i needed to do. It was making my workload harder so i found CakePHP (1).

    I loved that it was very much like rails but php so much easier for me to hack with it and adjust as needed. Also the documentation was absolutely amazing. Its some of the most solid documentation of any software i’ve ever used. Later they came out with CakePHP 2 and i migrated my app and loved all the improvements.

    When CakePHP 3 came out i was concerned about the amount of structural change so i kept the first app on 2 and built later apps in 3. I was pretty happy with 3. I’m not enough of a framework badass to tell you why 3 is better than 2 since they both work and the apps they power are great.

    Last month I started my first CakePHP 4 app and it feels pretty different from 3. The middleware concept was strange and the templates instead of views is pretty different. I’m not in love with 4 yet, they really embrace PHP7 so i’m still in the learning curve.
    They still have bake and you can get a scaffolding crud system up super quickly.

  2. They fixed the ORM a ton between Cake 2 and 3. It’s easier to use and more performant. If you used later versions of Cake 3, like 3.6 and up then 4 will feel pretty similar to those versions.

    The biggest issue with CakePHP is the lack of plugins compared to somethig like Laravel. But I haven’t played with Laravel enough to give a fair comparison. Quantity != Quality, but you cannot deny all the momentum is behind Laravel right now. I had wanted us to go with Laravel at my latest project at work, but the lead dev was dead set on Symfony. I think CakePHP strikes a good middle ground between the simplicity of something like CodeIginiter and the featureset/learning curve of something like Symfony. On the Yii note, a dev at work showed me some Yii code he worked on, felt pretty close to CakePHP.

    Having worked in Symfony for a year now, I’d go for Cake over it if your intention is to be on a SQL database. Again, wish I had experience in Laravel to give a comparison on that as well.

    Edit: I’ll add that I’ve spent a bit of time looking through some of the core code in CakePHP and it mostly looks pretty clean in there. It’s a mature framework.

  3. We have several big corporate projects that are based on CakePHP 4 (upgraded from 3) and after years we are still perfectly satisfied and never regretted our choice. CakePHP is very solid and well thought though.
    CakePHP 2 was easy to learn because it had a lot less functionality than 3 and 4. But these versions are much better suited for extensive and complex projects in return. I really like that the upgrade from 3 to 4 went so smooth even for our big projects because much of the general structure hadn’t changed. I think this is a very good sign about the solidity of the project and the fitness of the new general concept that had been introduced with version 3.
    Yes, the CRUD functionality is still quickly applicable and simple. The bake command is very helpful for this and there is also Components (Controller drop-ins) which enable you to build a CRUD system on your own that you can simply reuse in every controller.
    I don’t feel that market share is declining. I think that people would be mad moving away from CakePHP. We are even using it as a backend for a SPA now, skipping the templating system and returning JSON. The View and Middleware system make CakePHP a great base for a REST backend.

  4. We have a huge project in CakePHP3 right now, and it will be in the works migrating to.4 soon. I am looking forward to being able to update plugins and use current versions of phpunit. Phpunit is now taking 40 minutes on my fastest machine, and 1.5 hours on desktops.

  5. I startet with CakePHP 1.3 as a front end for my research databases in 2010. Compared with 4.1, it was simple but limited. Migrating from 1.3 to 3.x was a chore. I have just begun with 4.1 in order to port my last two 1.3 projects. Getting the Middleware architecture for authentication and authorization in place was a pain, but now 4.1 is beginning to shine. I am beginning to love it.


Leave a Comment