This is documentation for Kohana v2.3.x.

Table of Contents
StatusDraft

2.1 to 2.2 Upgrading

Upgrading from 2.1 to 2.2 may involve a considerable amount of work, if you have an application written using deprecated methods like $this→load.

Also, if your application relies on Forge or uses the Media module or controller, you need to be aware that these have been removed from 2.2

You will need to check that your config/config.php is up to date, that all references to Config::item and Log::add are changed in your application.

If your application makes extensive use of the old form validation class, you need to be aware that the 2.2 validation class is a completely new implementation, and will have to make the necessary changes.

Core

All functionality from the Config and Log classes has moved to the core Kohana class. See Kohana

Replace these in your code:

Configuration

Note1: Config files config/log.php and config/hooks.php are removed. Now configured in core config

Controllers

media controller has been removed.

Special Methods _default and _remap are replaced by __call($method, $arguments) see Controllers

By default, a 404 error will be triggered if a non-existent controller method is called, and __call is defined. You may override this behaviour in your method.

To simulate _remap Use __call and _private methods only.

template controller method display is now render

Libraries

Loader library has been removed. $this→load('something') syntax is obsolete and invalid.

Libraries and models must now be created using the following syntax: $example = new Example(); and $example = new Example_Model();

Where possible and applicable, use Factories to instance libraries, and reference library objects via their instance:

Library Changes

Modules