ez projects / ezp3toezp4migration
UNIX name | Owner | Status | Version | Compatible with |
---|---|---|---|---|
ezp3toezp4migration | Kristof Coomans | alpha | 0.1 | 4.x |
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.
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
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