From f2dcca6f9212923e54fb62ae58f79dc713b111ad Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 3 Jul 2012 16:05:34 +0300 Subject: Update the upgrade notes --- user_guide_src/source/installation/upgrade_300.rst | 97 ++++++++++++++++++---- 1 file changed, 79 insertions(+), 18 deletions(-) (limited to 'user_guide_src/source/installation/upgrade_300.rst') diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 676c99e6a..7b0d8abe9 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -1,15 +1,14 @@ ############################# -Upgrading from 2.1.0 to 3.0.0 +Upgrading from 2.1.2 to 3.0.0 ############################# .. note:: These upgrade notes are for a version that is yet to be released. +Before performing an update you should take your site offline by replacing the index.php file with a static one. -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 and replace your index.php file. If any modifications were made to your index.php @@ -18,22 +17,23 @@ they will need to be made fresh in this new one. .. note:: If you have any custom developed files in these folders please make copies of them first. -Step 2: Change References to the SHA Library -============================================ - -The previously deprecated SHA library has been removed in CodeIgniter 3.0. -Alter your code to use the native `sha1()` PHP function to generate a sha1 hash. +******************************** +Step 2: Replace config/mimes.php +******************************** -Additionally, the `sha1()` method in the :doc:`Encryption Library <../libraries/encryption>` has been removed. +This config file has been updated to contain more user mime-types, please copy +it to _application/config/mimes.php*. +************************************************************** Step 3: Remove $autoload['core'] from your config/autoload.php -============================================================== +************************************************************** -Use of the `$autoload['core']` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. -Move any entries that you might have listed there to `$autoload['libraries']` instead. +Use of the ``$autoload['core']`` config array has been deprecated as of CodeIgniter 1.4.1 and is now removed. +Move any entries that you might have listed there to ``$autoload['libraries']`` instead. +*************************************** Step 4: Update your config/database.php -======================================= +*************************************** Due to 3.0.0's renaming of Active Record to Query Builder, inside your `config/database.php`, you will need to rename the `$active_record` variable to `$query_builder`. @@ -42,13 +42,74 @@ need to rename the `$active_record` variable to `$query_builder`. // $active_record = TRUE; $query_builder = TRUE; +******************************* Step 5: Move your errors folder -=============================== +******************************* In version 3.0.0, the errors folder has been moved from _application/errors* to _application/views/errors*. +**************************************************************************** Step 6: Check the calls to Array Helper's element() and elements() functions -============================================================================ +**************************************************************************** The default return value of these functions, when the required elements -don't exist, has been changed from FALSE to NULL. \ No newline at end of file +don't exist, has been changed from FALSE to NULL. + +*************************************************************** +Step 7: Remove usage of (previously) deprecated functionalities +*************************************************************** + +In addition to the ``$autoload['core']`` configuration setting, there's a number of other functionalities +that have been removed in CodeIgniter 3.0.0: + +The SHA1 library +================ + +The previously deprecated SHA1 library has been removed, alter your code to use PHP's native +``sha1()`` function to generate a SHA1 hash. + +Additionally, the ``sha1()`` method in the :doc:`Encryption Library <../libraries/encryption>` has been removed. + +The EXT constant +================ + +Usage of the ``EXT`` constant has been deprecated since dropping support for PHP 4. There's no +longer a need to maintain different filename extensions and in this new CodeIgniter version, +the ``EXT`` constant has been removed. Use just '.php' instead. + +Smiley helper js_insert_smiley() +================================ + +:doc:`Smiley Helper <../helpers/smiley_helper>` function ``js_insert_smiley()`` has been deprecated +since CodeIgniter 1.7.2 and is now removed. You'll need to switch to ``smiley_js()`` instead. + +Security helper do_hash() +========================= + +:doc:`Security Helper <../helpers/security_helper>` function ``do_hash()`` is now just an alias for +PHP's native ``hash()`` function. It is deprecated and scheduled for removal in CodeIgniter 3.1+. + +.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. + +File helper read_file() +======================= + +:doc:`File Helper <../helpers/file_helper>` function ``read_file()`` is now just an alias for +PHP's native ``file_get_contents()`` function. It is deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. + +Pagination library 'anchor_class' setting +========================================= + +The :doc:`Pagination Library <../libraries/pagination>` now supports adding pretty much any HTML +attribute to your anchors via the 'attributes' configuration setting. This includes passing the +'class' attribute and using the separate 'anchor_class' setting no longer makes sense. +As a result of that, the 'anchor_class' setting is now deprecated and scheduled for removal in +CodeIgniter 3.1+. + +.. note:: This setting is still available, but you're strongly encouraged to remove it's usage sooner + rather than later. \ No newline at end of file -- cgit v1.2.3-24-g4f1b