CakePHP 2.7 is a fully API compatible upgrade from 2.6. This page outlines the changes and improvements made in 2.7.
The PHP version requirement for CakePHP 2.7 has been bumped up to PHP 5.3.0.
Plugin shells that share a name with their plugin can now be called without
the plugin prefix. For example
Console/cake MyPlugin.my_plugin can now
be called with
Shell::param() was backported from 3.0 into 2.7. This method provides
a notice error free way to read CLI options.
SQL datasources will now cast
'' when columns are
not nullable and rows are being created or updated.
CakeSession::consume() has been added to read and delete from
session in a single step.
Argument $renew has been added to
CakeSession::clear() to allow
emptying the session without forcing a new id and renewing the session. It
New setting level is now available. You can use it to specify field name in which the depth of tree nodes will be stored.
TreeBehavior::getLevel() has been added which fetches depth of
The formatting of
TreeBehavior::generateTreeList() has been extracted into
an own method
CakeEmail will now use the ‘default’ config set when creating instances that
do not specify a configuration set to use. For example
$email = new
CakeEmail(); will now use the ‘default’ config set.
String has been renamed to
CakeText. This resolves some
conflicts around HHVM compatibility as well as possibly PHP7+. There is
String class provided as well for compatibility reasons.
Validation::notEmpty() has been renamed to
This aims to avoid confusion around the PHP notEmpty() function and that the
validation rule accepts
0 as valid input.
text/plain Accept header is no longer automatically mapped to the
csv response type. This is a backport from 3.0