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

Chapter: Migrating from a previous version

« 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.
  • If you put your own libraries into the lib/ directory, don't forget to move them 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.3 or lower

Read the upgrade instructions of all previous manuals and then follow instructions below.

Upgrading from jelix 1.4.x

Here are all steps to follow to migrate your application.

Backup

First, do a backup of your databases, and of your application files (modules, configuration etc.).

Temp directories

As usual, you must remove every files into the temp/yourapp/ directory.

Files removal

Other stuffs

About jAcl2

jAcl2 class has been moved to a new module named jacl2. You should enable this module into the configuration:


   [modules]
   jacl2.access=1

The jelix updater will change other things automatically. Don't hesitate to declare the dependency with this module in your modules that use it.

About jPref

jPref classes have been moved to a new module named jpref. You should enable this module into the configuration if you use this feature.


   [modules]
   jpref.access=1

Don't hesitate to declare the dependency with this module in your modules that use it.

TCPDF Support

TCPDF, its fonts, the response object jResponseTcpdf, and the class jTcpdf have been included into a new module, jtcpdf. If your application uses these objects, you have to download this module (not available in the standard archive of Jelix) and you must install it. You don't have to modify something else, except if you made some classes inheriting from jResponseTcpdf or jTcpdf. You probably have to change some path in require or include instructions.

SOAP support

If you are using SOAP features (soap entry points, use of jWSDL..), you have to make this change:

  • In the configuration you have to remove the activation of the jWSDL module, since it doesn't exists anymore, and you have to activate the jsoap module.


   [modules]
   jWSDL.access=2  ; <- remove this line
   jsoap.access=2 ; <- add this line
  • In your soap.php (or other entrypoints for soap), you have to change the content like this:

require_once ('../application.init.php');

checkAppOpened();

jApp::loadConfig('soap/config.ini');
ini_set("soap.wsdl_cache_enabled", "0");

jClasses::inc('jsoap~jSoapCoordinator');
jClasses::inc('jsoap~jSoapRequest');

$jelix = new jSoapCoordinator();
jApp::setCoord($jelix);
$jelix->request = new jSoapRequest();
$jelix->request->initService();
$jelix->processSoap();
  • If you generate link for the jWSDL, change them by indicating the jsoap module
  • Modify the configuration of your SOAP clients that are using your soap services, by indicating the new URL of WSDLs.

Upgrading your modules

  • update sources of vendor's modules that you have installed, with version compatible with Jelix 1.5.
  • For your own modules:
    • In module.xml files, indicate that the module is compatible with Jelix 1.5 (change the attributes maxversion). Example:

        <jelix minversion="1.4" maxversion="1.5.*"/>
  • In your static HTML pages (via jResponseBasicHtml) and error page (error.en_US.php etc), the $basePath variable should be renamed to $BASEPATH (jelix 1.4.1)
  • Methods jCoordinator::isModuleEnabled() and jCoordinator::getModulePath() are now deprecated, they have been copied into jApp, you should then use jApp.

New API you can use:

  • jApp::pushCurrentModule(), jApp::popCurrentModule, jApp::getCurrentModule instead of jContext.
  • See the detailed changelog to know what are the new classes and methods you can use.

Deprecated API you cannot use anymore:

  • jContext

Jelix update

After all these modifications, you should run your install/installer.php script. The jelix module will change some things:

  • the configuration of the plugin jacl2 (and jacl if you still use it), is migrated into the configuration of the entry point. You don't need anymore to have a file like jacl2.coord.ini.php.