Tool written in Go that checks Magento rewrites.
This program allows to check if what has been modified in a patch file has been rewritten in a Magento 1 project. It works for official Magento security patches and patches manually generated with Git also.
Especially useful for a migration project since it's possible to generate a list of which files must be absolutely checked. Two kinds of objects are currently checked: classes and templates. It's working for both Magento CE and Magento EE, but community modules are not yet supported.
Even if the list generated by this tool is a good entry point for a migration work, it's definitely not exhaustive because of the Magento architecture. Therefore, a Magento expertise is still needed for a migration process.
Two arguments are mandatory and can be passed either as parameters or as environment variables.
patch
: absolute or relative path to the Magento/Git patch to check.project
: absolute or relative path to the project directory against whom the patch will be checked.
If you want to run the program from source files, download the whole repository and follow the examples below.
# Example with parameters
$ go run $HOME/Downloads/magento-diffchecker/*.go -patch $HOME/Downloads/magento_patch.sh -project $HOME/www/magento_project/
# Example with environment variables
$ PATCH=$HOME/Downloads/magento_patch.sh PROJECT=$HOME/www/magento_project/ go run $HOME/Downloads/magento-diffchecker/*.go
If you want to run the program from a binary, download the corresponding file and follow the examples below.
There are binaries available for Linux, Mac and Windows (32-bit x86 and 64-bit x86 architectures) in the /bin
directory.
# Example with parameters
$ $HOME/Downloads/magento-diffchecker-darwin-amd64 -patch $HOME/Downloads/magento_patch.sh -project $HOME/www/magento_project/
# Example with environment variables
$ PATCH=$HOME/Downloads/magento_patch.sh PROJECT=$HOME/www/magento_project/ $HOME/Downloads/magento-diffchecker-darwin-amd64
- Overwritten controllers are missing from the report.
- Community modules are not yet supported.