This article is part of the CakeDC Advent Calendar 2024 (December 12th 2024)
As many of you may know, CakePHP started back in 2005 with a minimal version of a framework for PHP. Then, in May 2006, version 1.0 of CakePHP was released including many of the features we still use today.
Over the years a lot of features have been added to the project, and others have been greatly improved. As the framework has evolved, many people have been involved on this project, and we think now it is good time to say *THANK YOU* to everyone that has participated in greater or lesser extent.
In this article, we will briefly recap some of the changes to the major (or most important) CakePHP versions throughout history. We will highlight the features that are still present in current version.
CakePHP 1.0 and 1.1: May 2006
- Compatibility with PHP4 and PHP5
- Integrated CRUD for database interaction and simplified queries
- Application Scaffolding
- Model View Controller (MVC) Architecture
- Request dispatcher with good looking, custom URLs
- Built-in Validation
- Fast and flexible templating (PHP syntax, with helpers)
- View Helpers for AJAX, Javascript, HTML Forms and more
- Security, Session, and Request Handling Components
- Flexible access control lists
- Data Sanitization
- Flexible View Caching
As you can see, most of the original features from CakePHP 1.x are still present in the 5.x version. Of course PHP4 and PHP5 compatibility does not makes sense right now, and Security and Session components have been replaced by most modern solutions.
CakePHP 1.2: Dec 2008
- CakePHP 1.0 and 1.1 features
- Code generation
- Email and Cookie component joins the party
- Localization
For CakePHP 1.2, we first see the code generation using the well-known Bake tool (now a plugin). Additionally, it is the first version where we have a way to create multi-language applications.
CakePHP 1.3: Apr 2010
- Improved Logging
- Removed inflections.php
- Some internal library renames and changes.
- Controller and Component improvements.
- Routing changes
- Performance improvement on Cache classes
CakePHP 2.0: October 2011
- Dropped PHP 4 support
- New Error and Exception handlers which are easier to configure, and ease working with errors such as page not found, unauthorized error and lots more.
- Improved I18n functions for easier multilingual development.
- Support for injecting your own objects to act as CakePHP libraries
- New Request and Response objects for easier handling of HTTP requests.
- Completely refactored Auth system.
- Brand new email library with support for multiple transports.
- Dropped SimpleUnit in favor of PHPUnit.
- Improved support for PostgreSql, SQLite and SqlServer.
- HTML 5 form inputs support in form helper.
- Huge performance improvements compared to version 1.3
CakePHP 2.0 did not change a lot from the way things were done in CakePHP 1.3, but it laid the foundation for the success of the following versions (including 2.x and the next major 3.x)
CakePHP 3.0: March 2015
- A New ORM
- Faster and more flexible routing
- Improved migrations using Phinx
- Better internationalization
- Improved Debugging Toolbar
- Composer usage
- Standalone libraries
- View cells
It is impossible to explain how much the framework changed from 2.x to 3.x. It is probably the most revolutionary version, since it introduced lots of improvements and changes like the amazing ORM and the database migrations management, both still in use. Even after almost 10 years it looks very timely and up-to-date.
CakePHP 4.0: December 2019
- PHP 7.2 required.
- Streamlined APIs with all deprecated methods and behavior removed.
- Additional typehints across the framework giving you errors faster.
- Improved error messages across the framework.
- A refreshed application skeleton design.
- New database types for fixed length strings (CHAR), datetime with
microseconds, and datetime with timezone types. - Table now features OrFail methods that raise exceptions on failure
making error handling more explicit and straightforward. - Middleware for CSP headers, Form tampering prevention, and HTTPS enforcement.
- Cake\Routing\Asset to make generating asset URLs simple from anywhere in
your application code. - FormHelper now generates HTML5 validation errors.
- FormHelper now generates HTML5 datetime input elements.
It seems as though the list is self-explanatory. If CakePHP 3.0 was revolutionary, CakePHP 4.0 continued modernizing the framework with middleware, new table methods, database types and a new application skeleton.
CakePHP 5.0: September 2023
- PHP 8.1 required.
- Improved typehints across the framework. CakePHP now leverages union types to formalize the types of many parameters across the framework.
- Upgraded to PHPUnit 10.x
- Support for read and write database connection roles.
- New enum type mapping support in the ORM enabling more expressive model layers with improved type checking.
- Table finders with named parameters, providing more expressive query building APIs.
- Added time-only Time type and greatly improved Date and DateTime support via chronos 3.x.
- Support for PSR17 HTTP factories was added.
And here we are, 1 year after CakePHP 5 was released, we are currently in version 5.1.20 (released November 10th). It is unbelievable that 20 years have already passed, and the team is more than excited about the upcoming changes and features we expect in CakePHP 6, 7 ,8 and beyond!
To finish we would like to make a special tribute (and thank them again) to the top 8 contributors from all time! Especially to our lead (and oldest active) developer, Mark Story (@markstory on Github or his Website) , who has been contributing for almost 17 years with more than 17k commits (an incredible average of 1000+ commits per year). Remember your name could be here as well! You just need to start contributing! (check out https://github.com/cakephp/cakephp/blob/5.x/.github/CONTRIBUTING.md).
This article is part of the CakeDC Advent Calendar 2024 (December 12th 2024)