3.7.9

Latest release in branch 3.7
Released 6 years ago (June 20, 2019)

Software CakePHP
Branch 3.7
First official release version 3.7.0
First official release date 7 years ago (December 09, 2018)
Supported
PHP versions
PHP 5.6-7.4
Release notes https://github.com/cakephp/cakephp/releases/tag/v3.7.9
Source code https://github.com/cakephp/cakephp/tree/v3.7.9
Documentation https://book.cakephp.org/3/en/index.html
Download https://book.cakephp.org/3/en/installation.html
CakePHP 3.7 Releases View full list

What Is New in CakePHP 3.7

This version introduces several new features, improvements, and deprecations to prepare for the future framework evolution. The table below summarizes the key changes.

Category Key Changes
New Features New Command base class, Mailer integration, FormHelper template improvements.
Improvements Better typehints, Cache engine enhancements, Database expression upgrades.
Deprecated Shell base class, several Helper and Table methods, old cache configs.
Bug Fixes Various fixes across ORM, View, and Console libraries.

How does the new Command class change console work?

The new Cake\Console\Command class replaces the old Shell class for writing console commands. This aligns CakePHP with modern PHP standards, using Symfony's Console component under the hood. In practice, you should extend Command for any new console tasks.

The old Shell class is now deprecated. Existing shells will still work but will trigger deprecation warnings. This change matters because it streamlines argument parsing and output formatting, making commands more consistent and testable.

What mailer features were added?

CakePHP 3.7 integrates the Cake\Mailer\Mailer class directly into the framework core. Previously, it was a separate plugin. This provides a structured, object-oriented way to define and send emails from your application.

You can now create mailer classes that define email layouts, content, and transport configuration. It keeps email logic separate from your controllers and models, which is a cleaner approach for complex applications.

Are there template rendering updates?

Yes, the FormHelper received updates to its template system. New template methods like create() and end() provide more flexibility. The helper now uses the Templater interface consistently.

These changes allow for easier customization of form HTML output. You can override templates per helper instance, which is useful for large projects with multiple form styles.

What database expressions are improved?

The QueryExpression::add() method now accepts an optional third argument for defining the expression type. This improves the ability to build complex SQL conditions programmatically and safely.

It helps the ORM generate more accurate SQL, especially when using nested conditions or custom expression objects. This is a low-level improvement that makes building advanced queries more reliable.

Which deprecated items should I act on first?

Focus on deprecations in code you actively maintain. The old Shell class and related base classes are top priorities for console applications. Also, update any cache configurations using the old Cache::config() method to use Cache::setConfig() instead.

Check uses of deprecated Table methods like addBehavior() and hasField(). The framework will guide you with warnings, but addressing these early reduces upgrade effort for the next major version.

FAQ

Is CakePHP 3.7 a major breaking change release?
No, it's a feature release with added functionality and deprecations. It maintains backward compatibility, but deprecated features will trigger warnings. You should test your application and address deprecations to prepare for CakePHP 4.0.

Do I have to rewrite all my console shells immediately?
No, existing shells continue to work but will show deprecation notices. You should plan to migrate them to the new Command class for new development or when you refactor that part of your codebase.

How do I start using the new Mailer class?
Create a new class extending Cake\Mailer\Mailer. Define your email methods and configurations there, then call it from your controllers or services. Refer to the official documentation for detailed examples.

What's the deal with the Cache::config() deprecation?
The method Cache::config() is deprecated in favor of Cache::setConfig(). This change aligns with naming conventions used elsewhere in the framework. Update your calls to avoid future breakage.

Are typehint improvements going to break my plugins?
They might, if your plugin overrides core methods and doesn't match the updated signatures. Check your plugin code against the new method signatures in the framework, especially in Database and ORM layers, and adjust accordingly.

Releases In Branch 3.7

Version Release date
3.7.9 6 years ago
(June 20, 2019)
3.7.8 6 years ago
(May 30, 2019)
3.7.7 6 years ago
(April 24, 2019)
3.7.6 7 years ago
(April 10, 2019)
3.7.5 7 years ago
(March 14, 2019)
3.7.4 7 years ago
(February 09, 2019)
3.7.3 7 years ago
(January 22, 2019)
3.7.2 7 years ago
(January 04, 2019)
3.7.1 7 years ago
(December 18, 2018)
3.7.0 7 years ago
(December 09, 2018)
3.7.0-RC3 7 years ago
(November 26, 2018)
3.7.0-RC2 7 years ago
(November 17, 2018)
3.7.0-RC1 7 years ago
(October 25, 2018)
3.7.0-beta1 7 years ago
(October 11, 2018)