Stable Release in branch 4.4
4.4.18
Released 22 Sep 2023
(3 years ago)
SoftwareCakePHP
Version4.4
Supported
PHP versions
PHP 7.4+
Initial release4.4.0
06 Jun 2022
(4 years ago)
Latest release4.4.18
22 Sep 2023
(3 years ago)
End of security fixes09 Sep 2026
(Ended 1 month ago)
Release noteshttps://github.com/cakephp/cakephp/releases/tag/4.4.18
Source codehttps://github.com/cakephp/cakephp/tree/4.4.18
Documentationhttps://book.cakephp.org/4/en/index.html
Downloadhttps://book.cakephp.org/4/en/installation.html
CakePHP 4.4 ReleasesView full list

What Is New in CakePHP 4.4

CakePHP 4.4 introduces a set of focused enhancements and deprecations to streamline development and prepare for the future. The table below summarizes the key updates.

Category Key Changes
New Features New ResultFormatterInterface for Console, ServerRequest::getUploadedFiles() method.
Improvements Better type hints, new QueryExpression::or() method, Plugin::isLoaded() check.
Deprecations Legacy ResultSetInterface, Database\Log\LoggedQuery::$params, Controller::viewBuilder() as property.
Bug Fixes & Cleanup Various fixes in Database, ORM, Console, and View layers.

How does CakePHP 4.4 improve type safety?

The framework adds more precise type hints across core classes. This gives your IDE and static analysis tools better information to work with, catching potential issues earlier in development.

For instance, methods in ConnectionManager, TableRegistry, and several Query methods now have updated signatures. In practice, this means fewer surprises with return types and clearer contracts for extending core classes.

What new tools are available for database queries?

A new QueryExpression::or() method provides a fluent way to create OR conditions. It's a small but welcome addition that makes complex conditional logic in queries more readable.

// Using the new or() method
$query->where(function ($exp) {
    return $exp->or([
        'author_id' => 3,
        'status' => 'published'
    ]);
});

What changes affect console output formatting?

Console commands gain flexibility with the new ResultFormatterInterface. This allows you to create custom formatters to control how command results are displayed, moving beyond the default JSON or plain text.

If you've ever wanted to output console data as XML, YAML, or a custom table format, you can now implement this interface. It's a step towards more reusable and testable console components.

Which deprecated features should I update now?

Several older interfaces and patterns are marked for removal in 5.0. The deprecated ResultSetInterface is the big one; you should type-hint against ResultSet instead.

Also, accessing Controller::viewBuilder as a property (e.g., $this->viewBuilder) is deprecated. Use the viewBuilder() *method* to get the builder instance. These changes are straightforward but important for a smooth future upgrade.

Are there new helper methods for plugin and file handling?

Yes. Plugin::isLoaded() lets you check if a plugin is loaded without needing to catch an exception. For file uploads, ServerRequest::getUploadedFiles() provides a direct way to fetch the normalized upload data array.

These are quality-of-life improvements. The plugin check is cleaner for conditional logic, and the uploaded files method offers a more object-oriented approach compared to digging into request data.

FAQ

Is CakePHP 4.4 a major feature release?
No, it's a feature release within the 4.x series. It adds some new utilities and deprecates older code to prepare for 5.0, but doesn't include breaking changes for existing, non-deprecated APIs.

What should I do about the deprecated ResultSetInterface?
Update your type hints in models and other classes from ResultSetInterface to the concrete ResultSet class. This is a simple find-and-replace operation in most codebases.

Why was accessing Controller::$viewBuilder as a property deprecated?
Using the viewBuilder() method ensures you always get a fresh instance of the builder, which is more reliable for configuration, especially in test environments or when using callbacks.

Does the new QueryExpression::or() method replace the existing orWhere()?
Not at all. It's an additional, fluent way to build conditions within an expression object. You can keep using orWhere(); this just provides another option that can be cleaner when combining multiple conditions.

How do I use the new console ResultFormatterInterface?
Create a class that implements Cake\Console\ResultFormatterInterface and define the output() method. Then, your console commands can use this formatter to control how their result data is printed. Check the CakePHP book on Result Formatters for a detailed example.

Releases In Branch 4.4

VersionRelease date
4.4.1822 Sep 2023
(3 years ago)
4.4.1719 Aug 2023
(3 years ago)
4.4.1605 Aug 2023
(3 years ago)
4.4.1501 Jul 2023
(3 years ago)
4.4.1422 May 2023
(3 years ago)
4.4.1322 Apr 2023
(3 years ago)
4.4.1223 Mar 2023
(3 years ago)
4.4.1110 Feb 2023
(3 years ago)
4.4.1005 Jan 2023
(3 years ago)
4.4.929 Dec 2022
(3 years ago)
4.4.801 Dec 2022
(3 years ago)
4.4.729 Oct 2022
(3 years ago)
4.4.601 Oct 2022
(4 years ago)
4.4.528 Aug 2022
(4 years ago)
4.4.407 Aug 2022
(4 years ago)
4.4.326 Jul 2022
(4 years ago)
4.4.205 Jul 2022
(4 years ago)
4.4.113 Jun 2022
(4 years ago)
4.4.006 Jun 2022
(4 years ago)
4.4.0-RC214 May 2022
(4 years ago)
4.4.0-RC119 Mar 2022
(4 years ago)