Migration from 3.2 to 3.3

1. Introduction

Version 3.3 is almost fully compatible with it's predecessor. After execution of the automatic migration only minor adaptions are necessary as described in chapter 3.

As of the 3.3 release enhancement of version version 3.2 will be discontinued. Security and bug fixes will be available until mid of 2017.

This article shows how to update your application to APF version 3.3. As you might already be familiar with from previous versions migration can be done in an automated fashion for nearly all changes. For this reason, the release contains two scripts: migrate-code.sh to update your HTML and PHP files and migrate-config.sh for configuration files.

The APF team recommends to use the migration scripts rather than upgrading manually. This not only saves time and money but also ensure that all relevant areas of your project code are covered.

The below chapters contain an in-depth description on how to switch to APF 3.3 and which kind of changes have to be applied to your existing application(s) to run them based on this version.

2. Automated migration

Migration can be done using the migration script shipped along with the release. This release includes changes to code, templates, and configuration files. Using migrate-code.sh and migrate-config.sh you can easily be adapted your existing application to the new scheme.

Please be sure to execute all steps described under Migration from 3.1 to 3.2. In case you are using an order version of the APF, please completely migrate to version 3.2. Instructions can be taken from Articles.
Please create a backup before execution of the scripts to be able to restore parts of your application if necessary!

In case your development environment is windows, please install the latest cygwin version (download under cygwin.com). Migration for Windows Batch Scripts is not supported.

To update the code files to the latest scheme, please execute the script as follows:

Please change to the code directory before execution to avoid unexpected results.
Code
$ /path/to/APF/migration/migrate-code.sh /cygdrive/c/xampp/php/php ############################################# # APF 3.3 automatic code migration # ############################################# Checking PHP executable available ... [OK] Using given php executable at /cygdrive/c/xampp/php/php. PHP Version: 7.0.14. ############################################# Starting migration ... * Migrate form-to-model-mapping API... ############################################# Migration done! Please check your code and follow instructions within migration documentation!

To update the configuration files to the latest scheme, please execute the script as follows:

Please change to the configuration directory before execution to avoid unexpected results.
Code
$ /path/to/APF/migration/migrate-config.sh /cygdrive/c/xampp/php/php ############################################# # APF 3.3 automatic configuration migration # ############################################# Checking PHP executable available ... [OK] Using given php executable at /cygdrive/c/xampp/php/php. PHP Version: 7.0.14. ############################################# Starting configuration migration ... ############################################# Migration done! Please check your configuration and follow instructions within migration documentation!

3. Manual steps

Unfortunately, not all components of your application can be migrated by the delivered scripts. This chapter lists all changes to be applied by hand.

3.1. API change standard language for DOM nodes

In previous version of the APF DOM nodes have been initialized with a standard language:

PHP code
APFObject::$language = 'de';

This complicated error analysis when using language and/or context dependent configurations. Details can be taken from tracker entry ID#312.

In order to define a standard language please use method setLanguage() of the Frontcontroller class:

PHP code
$fC = Singleton::getInstance(Frontcontroller::class); $fC->setLanguage('de');

3.2. Removal of the mailSender component

In version 3.3 the mailSender component has been removed as it was marked as deprecated in release 3.0. In order to send e-mails with the APF, please use class Message introduced in version 3.3.

Details can be taken from chapter E-mail distribution.

Comments

Do you want to add a comment to the article above, or do you want to post additional hints? So please click here. Comments already posted can be found below.
There are no comments belonging to this article.