Path

ez projects / ezp3toezp4migration


eZ Publish 3 to 4 migration tools

UNIX name Owner Status Version Compatible with
ezp3toezp4migration Kristof Coomans alpha 0.1 4.x
This project aims to bundle some tools that are useful for upgrading custom code written for eZ Publish 3 / PHP 4.4 for use with eZ Publish 4 / PHP 5.

Currently there are 2 command line scripts: bin/listincludes.php and bin/replaceconstants.php. They both use the PHP tokenizer functions to extract / replace code from PHP source files.

Listing includes

To list all includes and requires, use the bin/listincludes.php script. It outputs a CSV list, with semicolon as the field delimiter. Most likely you want to redirect the output to a file.

You can pass a path to search for PHP files as an argument to the command line script. By default it uses the current path.

Example, storing the list of includes in the powercontent extension into a file powercontent_includes.csv:

php listincludes.php extension/powercontent > powercontent_includes.csv

Replacing constants

To replace occurrences of PHP constants, use the bin/replaceconstants.php script. It reads out the list of replacements from the new_constants.csv file. This CSV file contains the constants of eZ Publish 3 that were changed in eZ Publish 4.

You can pass a path to search for PHP files as an argument to the command line script. By default it uses the current path.

Example, replacing constants in the powercontent extension:

php replaceconstants.php extension/powercontent

No news yet.

This project has no reviews yet. Be the first one to review it!