− Table of content
When you migrate from an old version of jelix to a newer one, you always must do these tasks:
- replace the
lib/
directory by the one provided in the new version. - don't forget to move your own libraries from the old
lib/
directory to the new one - remove all the files in the
temp/yourapp/
directory - update your code as specified hereafter.
Updating from jelix 1.2.9 ¶
- If you want to use the new hashing system in jAuth, provided by Jelix 1.2.10, be sure to follow the migration instructions.
Updating from jelix 1.1 ¶
What you have to know before the migrating ¶
There is a new way to declare modules in the application. In the configuration file, unusedModules
, trustedModules
and checkTrustedModules
are not used anymore. There is now a "modules" section, in which a level access of each modules is declared.
To use a module, a module should be "installed". In fact, there should be a new file installer.ini.php
which contains, for each entrypoints, the list of installed modules, and for each of them, the installed version. New commands "installapp" and "installmodule" are provided to install and upgrade modules. You shouldn't modify yourself the installer.ini.php
file.
Migrating ¶
A "migrate" command is provided, in order to do needed changes in configuration file of your existing application made with jelix 1.1, and to create this installer.ini.php
file. Follow these steps:
- save your application files. If the migrate script failed, you should have to restore your previous configuration files and remove new files, before relaunching the migrate command.
- replace the
lib/
directory by thelib/
of Jelix 1.2 - verify that your project.xml is ok, that it contains a <jelix> tag with the max version to "1.1" and declares all entry points. See the chapter about this file.
- in your configuration files (defaultconfig.ini.php and other ini files):
- set
checkTrustedModules
to "on" - removed from
modulesPath
, directories where you don't use any modules - list all modules which can be called from the web in
trustedModules
- list all modules you don't use at all in
unusedModules
. If you indicatedlib/jelix-admin-modules
and/orlib/jelix-modules
inmodulesPath
, see the list of modules inside them and indicate those you don't use. The list has changed since jelix 1.1.
- set
- go into
lib/jelix-scripts/
and runphp jelix.php --yourapp migrate
- removed all files from
temp/yourapp/
- read the next section, to do changes in your code
- test your application. it should be ok.
A new a installation script yourapp/install/installer.php
has been created, so you can use it later (in a command line) to install or update easily your application. You can create scripts into the install/
directory of your modules, which will be called to install or upgrade your modules. Read the corresponding chapter in this manual.
Other migration steps ¶
- The support of old action selectors and old class naming used as of Jelix 1.0 beta, have been removed. You should change your selector and class name if you migrate from a very old version of Jelix < 1.0.
- If you use directly jelixuser.dao.xml, you should change your selector: it has been moved from the jauth module to jauthdb module.
- if you made your own jDb driver with a plugin for jDaoGenerator, you should change some methods calls, since some of them have been renamed. A refactoring has been made and you can redefine more methods.
- If you made a customized datasource for jForms, replace the name of the interface
jIFormDatasource
byjIFormsDatasource
. - the deprecated method
jResponseHtml::_commonProcess()
has been removed (you must rename it todoAfterActions
)
Updating from Jelix 1.0 or lower ¶
Read the manual of jelix 1.1 to upgrade from 1.0 to 1.1, and then you could upgrade to 1.2 version.