summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/installation/upgrade_200.rst
blob: 064e1b534d9d2a1936c021afea3f2da08c96571c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#############################
Upgrading from 1.7.2 to 2.0.0
#############################

Before performing an update you should take your site offline by
replacing the index.php file with a static one.

Step 1: Update your CodeIgniter files
=====================================

Replace all files and directories in your "system" folder **except**
your application folder.

.. note:: If you have any custom developed files in these folders please
	make copies of them first.

Step 2: Adjust get_dir_file_info() where necessary
=====================================================

Version 2.0.0 brings a non-backwards compatible change to
get_dir_file_info() in the :doc:`File
Helper <../helpers/file_helper>`. Non-backwards compatible changes
are extremely rare in CodeIgniter, but this one we feel was warranted
due to how easy it was to create serious server performance issues. If
you *need* recursiveness where you are using this helper function,
change such instances, setting the second parameter, $top_level_only
to FALSE::

	get_dir_file_info('/path/to/directory', FALSE);

Step 3: Convert your Plugins to Helpers
=======================================

2.0.0 gets rid of the "Plugin" system as their functionality was
identical to Helpers, but non-extensible. You will need to rename your
plugin files from filename_pi.php to filename_helper.php, move them to
your helpers folder, and change all instances of::

	$this->load->plugin('foo');

to ::

	$this->load->helper('foo');


Step 4: Update stored encrypted data
====================================

.. note:: If your application does not use the Encryption library, does
	not store Encrypted data permanently, or is on an environment that does
	not support Mcrypt, you may skip this step.

The Encryption library has had a number of improvements, some for
encryption strength and some for performance, that has an unavoidable
consequence of making it no longer possible to decode encrypted data
produced by the original version of this library. To help with the
transition, a new method has been added, encode_from_legacy() that
will decode the data with the original algorithm and return a re-encoded
string using the improved methods. This will enable you to easily
replace stale encrypted data with fresh in your applications, either on
the fly or en masse.

Please read `how to use this
method <../libraries/encryption.html#legacy>`_ in the Encryption library
documentation.

Step 5: Remove loading calls for the compatibility helper.
==========================================================

The compatibility helper has been removed from the CodeIgniter core. All
methods in it should be natively available in supported PHP versions.

Step 6: Update Class extension
==============================

All core classes are now prefixed with CI\_. Update Models and
Controllers to extend CI_Model and CI_Controller, respectively.

Step 7: Update Parent Constructor calls
=======================================

All native CodeIgniter classes now use the PHP 5 \__construct()
convention. Please update extended libraries to call
parent::\__construct().

Step 8: Update your user guide
==============================

Please replace your local copy of the user guide with the new version,
including the image files.