oro / upgrade-toolkit
The Oro Source Code Upgrade Toolkit
Requires
- phpstan/phpstan: 1.10.57
- rector/rector: 1.0.3
Requires (Dev)
- phpunit/phpunit: ^10.2
This package is auto-updated.
Last update: 2024-11-05 21:27:45 UTC
README
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
Installation
composer require oro/upgrade-toolkit:dev-master --dev
Suggested workflow
- 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.
Usage
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.
Testing
To run tests
php bin/phpunit --testsuite upgrade-toolkit --configuration vendor/oro/upgrade-toolkit/phpunit.xml.dist
License
This bundle is under the MIT license. See the complete license in the bundle.