Several new versions have been released for the PHP framework CakePHP. The first alpha for CakePHP 4.0.0 and the first beta for 3.8.0 is included. In addition, CakePHP 3.7.6 is also available as a maintenance release. We take a look at the innovations.
The CakePHP core team has just released several new releases for the PHP Framework CakePHP. CakePHP 4.0.0-alpha1 and CakePHP 3.8.0-beta1 are available. Also, CakePHP 3.7.6 has been released with some bugfixes.
CakePHP 4.0.0-alpha1: Targets for CakePHP 4.0.0
With the release of CakePHP 4.0.0-alpha 1, the core team has pursued some major goals and, according to the release note, also partially implemented them with the first alpha. On the one hand, with version 4.0.0, all features and functions marked as deprecated in 3.x and removed in 4.x are to be removed. In addition, other features have been marked as deprecated, but they should only be removed with version 5.0.0 (see 4.0 Migration Guide ). The upcoming 4.0.0 release is according to announcement post for further CakePHP versions the first for four years, which contains Breaking Changes.
PHP 7.2 as a minimum version?
Open and ready for feedback is the question, which PHP version will be the minimum version for CakePHP 4.0.0. Due to the end-of-life for PHP 5 and 7.0, the CakePHP core team is considering PHP 7.2 as a minimum requirement to use the latest version of the framework. Feedback can be provided on GitHub.
Alpha1 with new features and scheduled breaking opportunities for CakePHP 4.0.0 release
In addition to removing deprecated features, the first alpha from CakePHP 4.0.0 brings some new features. For example, the ORM has been adapted to automatically process the conversion of the time zone between the application server and the time zone of the database if they differ.
Also new is support for PSR-15 (HTTP Server Request Handler). Cake/Http/Client should now also allow PSR-18 (HTTP client).
Information about the mentioned and other features can be found in the release note . In addition, the migration guide for the upcoming 4.0.0.-version provides more information about the expected breaking changes as well as other planned features of the major version.
Beta1 for CakePHP 3.8.0 with new features
With the published 3.8.0-beta1 can be guessed what CakePHP 3.8.0 will include. According to the release notes to 3.7.0, this update should not even exist. However, 3.8.0 now serves as a way to add the following missing notEmpty* methods:
Furthermore, errors in the parameter allowEmpty* within the allowEmpty* methods are to be eliminated.
The major version CakePHP 3.8.0 is an API-compatible upgrade from version 3.7 and will include six new features. By adding Model Classes, Cake/Datasource/ModelAwareTrait::get() be able to locate fully-qualified class names in the future. This allows developers to use ArticleTable::class as a parameter to get() .
Also new is that Email::setHeaders() and Email::addHeaders() allow you to set multiple headers with the same name. The value of each header key passed to the above functions must be an array in the argument array. This can look like this:
[cc lang=”php”]$email->addHeaders([‘og:tag’ => [‘foo’, ‘bar’]]);[/cc]
The beta version is installed via Composer:
[cc lang=”php”]php composer.phar require –update-with-dependencies “cakephp/cakephp:3.8.0-beta1″[/cc]
For more information about the planned changes in version 3.8.0, see the CakePHP 3.8.0 Migration Guide.
Bugfixes in CakePHP 3.7.6
CakePHP 3.7.6 is a maintenance release for the 3.7 branch and therefore contains no new features. Fixed some community-reported bugs and revised the API documentation. Further information on the publication can be found in the release note .