Skip to content

Latest commit

 

History

History
220 lines (151 loc) · 5.57 KB

2-3-migration-guide.rst

File metadata and controls

220 lines (151 loc) · 5.57 KB

2.3 Migration Guide

CakePHP 2.3 is a fully API compatible upgrade from 2.2. This page outlines the changes and improvements made in 2.3.

Constants

An application can now easily define :php:const:`CACHE` and :php:const:`LOGS`, as they are conditionally defined by CakePHP now.

Caching

  • FileEngine is always the default cache engine. In the past a number of people had difficulty setting up and deploying APC correctly both in cli + web. Using files should make setting up CakePHP simpler for new developers.

Component

AuthComponent

  • A new authenticate adapter has been added to support blowfish/bcrypt hashed passwords. You can now use Blowfish in your $authenticate array to allow bcrypt passwords to be used.

PaginatorComponent

  • PaginatorComponent now supports the findType option. This can be used to specify what find method you want used for pagination. This is a bit easier to manage and set than the 0'th index.

SecurityComponent

  • SecurityComponent now supports the unlockedActions option. This can be used to disable all security checks for any actions listed in this option.

RequestHandlerComponent

CookieComponent

Console

  • The server shell was added. You can use this to start the PHP5.4 webserver for your CakePHP application.
  • Baking a new project now sets the application's cache prefix to the name of the application.

I18n

L10n

  • nld is now the default locale for Dutch as specified by ISO 639-3 and dut its alias. The locale folders have to be adjusted accordingly (from /locale/dut/ to /locale/nld/).

Core

Configure

Error

Exceptions

  • CakeBaseException was added, which all core Exceptions now extend. The base exception class also introduces the responseHeader() method which can be called on created Exception instances to add headers for the response, as Exceptions don't reuse any response instance.

Model

  • Support for the biginteger type was added to all core datasources, and fixtures.
  • Support for FULLTEXT indexes was added for the MySQL driver.

Model

  • Model::find('list') now sets the recursive based on the max containment depth or recursive value. When list is used with ContainableBehavior.

Validation

  • Missing validation methods will always trigger errors now instead of only in development mode.

Network

SmtpTransport

  • TLS/SSL support was added for SMTP connections.

CakeRequest

CakeResponse

CakeEmail

Routing

Router

View

  • MediaView is deprecated, and you can use new features in :php:class:`CakeResponse` to achieve the same results.
  • Serialization in Json and Xml views has been moved to _serialize()
  • beforeRender and afterRender callbacks are now being called in Json and Xml views when using view templates.
  • :php:meth:`View::fetch()` now has a $default argument. This argument can be used to provide a default value should a block be empty.

Helpers

FormHelper

TextHelper

Testing

  • A core fixture for the default cake_sessions table was added. You can use it by adding core.cake_sessions to your fixture list.

Utility

CakeNumber

Folder

String

Debugger

  • php:meth:Debugger::exportVar() now outputs private and protected properties in PHP >= 5.3.0.

Security

Validation