CakePHP 2.7.0 Released
The CakePHP core team is happy to announce the immediate availability of CakePHP 2.7.0. 2.7.0 is an API compatible feature release for the 2.x release series. The last 2.6 release will be 2.6.9, which will be released later this week.
2.7.0 should be a drop in replacement for your existing 2.5 or 2.6 libraries. In 2.7 the following new features are available.
Deprecations
- The class
String
has been renamed toCakeText
. This resolves some conflicts around HHVM compatibility as well as PHP7. TheString
class is still provided for compatibility reasons. Validation::notEmpty()
has been renamed toValidation::notBlank()
. This aims to avoid confusion around the PHPnotEmpty()
function and that the validation rule accepts0
as valid input.SessionComponent::setFlash()
has been deprecated. You should useFlashComponent
instead.SessionHelper::flash()
has been deprecated. You should useFlashHelper
instead.
Backported Features From 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 withConsole/cake my_plugin
. Configure::consume()
has been added to read and delete from Configure in a single step.CakeSession::consume()
has been added to read and delete from session in a single step.- New setting
level
is now available inTreeBehavior
. You can use it to specify field name in which the depth of tree nodes will be stored. - New method
TreeBehavior::getLevel()
has been added which fetches depth of a node. SessionComponent::consume()
has been added to read and delete from session in a single step.SessionHelper::consume()
has been added to read and delete from session in a single step.Shell::param()
has been added. This method allows you to read CLI options without notice errors.- The
text/plain
content type is no longer mapped to the 'csv' response type by RequestHandlerComponent. This helps fix issues when applications used jQuery and csv responses.
Other Improvements
- SQL datasources will now cast
''
andnull
into''
when columns are not nullable and rows are being created or updated. - Argument
$renew
has been added toCakeSession::clear()
to allow emptying the session without forcing a new id and renewing the session. It defaults totrue
. - 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. ControllerTestCase::testAction()
now supports an array as URL.
As always, a huge thanks to all the community members that helped make this
release happen by reporting issues, writing documentation and sending pull requests.
Download a packaged release on github.