4.4.18

Latest release in branch 4.4
Released 2 years ago (September 28, 2023)

Software CakePHP
Branch 4.4
End of security fixes September 09, 2026
First official release version 4.4.0
First official release date 3 years ago (June 07, 2022)
Supported
PHP versions
PHP 7.4+
Release notes https://github.com/cakephp/cakephp/releases/tag/4.4.18
Source code https://github.com/cakephp/cakephp/tree/4.4.18
Documentation https://book.cakephp.org/4/en/index.html
Download https://book.cakephp.org/4/en/installation.html
CakePHP 4.4 Releases View 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

Version Release date
4.4.18 2 years ago
(September 28, 2023)
4.4.17 2 years ago
(August 20, 2023)
4.4.16 2 years ago
(August 05, 2023)
4.4.15 2 years ago
(July 02, 2023)
4.4.14 2 years ago
(May 23, 2023)
4.4.13 2 years ago
(April 23, 2023)
4.4.12 3 years ago
(March 24, 2023)
4.4.11 3 years ago
(February 11, 2023)
4.4.10 3 years ago
(January 06, 2023)
4.4.9 3 years ago
(December 30, 2022)
4.4.8 3 years ago
(December 02, 2022)
4.4.7 3 years ago
(October 30, 2022)
4.4.6 3 years ago
(October 02, 2022)
4.4.5 3 years ago
(August 29, 2022)
4.4.4 3 years ago
(August 08, 2022)
4.4.3 3 years ago
(July 27, 2022)
4.4.2 3 years ago
(July 06, 2022)
4.4.1 3 years ago
(June 13, 2022)
4.4.0 3 years ago
(June 07, 2022)
4.4.0-RC2 3 years ago
(May 15, 2022)
4.4.0-RC1 4 years ago
(March 19, 2022)