CakePHP 2.7.0 發布,PHP 開發框架
CakePHP是一個運用了諸如ActiveRecord、Association Data Mapping、Front Controller和MVC等著名設計模式的快速開發框架。該項目主要目標是提供一個可以讓各種層次的PHP開發人員快速地開發出健壯的Web應用,而 又不失靈活性。主要特性:
基于MVC架構
視圖支持Ajax
內置校驗框架
提供應用程序的基礎模塊和CRUD 代碼自動生成功能
提供處理session,request,security的組件
靈活的視圖緩存功能
面向對象
無需配置:只要安裝好數據庫
兼容PHP4和PHP5。
CakePHP 2.7.0 發布,此版本 API 兼容 2.x 系列,最新的 2.6 系列版本是 2.6.9 版本,這周將會發布。
CakePHP 2.7.0 可以替換你現有的 2.5 或者 2.6 庫,此版本包括一些新特性。
廢棄特性:
-
The class
Stringhas been renamed toCakeText. This resolves some conflicts around HHVM compatibility as well as PHP7. TheStringclass 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 accepts0as valid input. -
SessionComponent::setFlash()has been deprecated. You should useFlashComponentinstead. -
SessionHelper::flash()has been deprecated. You should useFlashHelperinstead.
新特性:
-
Plugin shells that share a name with their plugin can now be called without the plugin prefix. For example
Console/cake MyPlugin.my_plugincan 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
levelis 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/plaincontent type is no longer mapped to the 'csv' response type by RequestHandlerComponent. This helps fix issues when applications used jQuery and csv responses.
其他改進:
-
SQL datasources will now cast
''andnullinto''when columns are not nullable and rows are being created or updated. -
Argument
$renewhas 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.
下載:https://github.com/cakephp/cakephp/archive/2.7.0.zip。