Quick links: Content - sections - sub sections
EN FR
Jelix 1.2.13

Chapter: Migrating to Jelix 1.2.x

« New features ^ Introduction
Switch to language: FR

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

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 the lib/ 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 indicated lib/jelix-admin-modules and/or lib/jelix-modules in modulesPath, see the list of modules inside them and indicate those you don't use. The list has changed since jelix 1.1.
  • go into lib/jelix-scripts/ and run php 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 by jIFormsDatasource.
  • the deprecated method jResponseHtml::_commonProcess() has been removed (you must rename it to doAfterActions)

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.