A command line helper that facilitates upgrading the source code of the Oro application:
- From version 4.0 to 4.2
- From version 5.0 to 5.1
- From version 5.1 to 6.0
- From version 4.0 to 6.0
- From version 5.0 to 6.0
composer require oro/upgrade-toolkit:dev-master --dev
- Analyze your code with and review suggested changes:
php bin/upgrade-toolkit --dry-run
- Apply suggested changes:
php bin/upgrade-toolkit --clear-cache
-
Fix Code Style. Use IDE build-in solutions (E.G.: “Code > Reformat Code” in PhpStorm)
or run Php-CS-Fixer
php bin/php-cs-fixer fix src --verbose --config=vendor/oro/platform/build/.php-cs-fixer.php
and PHP_CodeSniffer
php bin/phpcbf src/ -p --encoding=utf-8 --extensions=php --standard=vendor/oro/platform/build/Oro/phpcs.xml
- Run required automated tests to ensure that the upgraded code still works properly.
Run:
php bin/upgrade-toolkit
In most cases, the command can be used without any options.
If additional adjustments are needed - run the command with the --help
option to get details
php bin/upgrade-toolkit --help
Rector rule sets are still available to run separately:
bin/rector process src --config vendor/oro/upgrade-toolkit/sets/oro-51.php
Replace src with the path to your source directory, if not src/, and oro-51.php with the desired upgrade set (oro-51.php or oro-60.php).
You can add --dry-run to the bin/rector command to verify the results without actually making any changes.
To run tests
php bin/phpunit --testsuite upgrade-toolkit --configuration vendor/oro/upgrade-toolkit/phpunit.xml.dist
This bundle is under the MIT license. See the complete license in the bundle.