First, install globally the magento2-tools:
composer global require algolia/magento2-toolsMake sure to place Composer's system-wide vendor bin directory in your $PATH
so the magento2-tool executable can be located by your system.
Finally, you can launch the quality tools with:
{command} path/to/magento/extensionHere is the list of available commands:
-
magento2-lint: Runs the linter and fixes the found issues - configuration file underalgoliasearch-magento-2/.php_cs. -
magento2-types: Runs the type checker and displays the found issues - configuration file underalgoliasearch-magento-2/phpstan.neon. -
magento2-php-compatibility: Checks if your code is compatibility between multiple all php versions supported by magento. -
magento2-test: Runs all previous commands in--dry-runmode.
- Clear your the local repository with:
git add . && git reset --hard - Make sure you are on the latest master branch:
git checkout master && git pull
Note: make sure that there is no breaking changes and you may use
git tag --listto check the latest release
- Bump version in the file
bin/magento2-update - Commit the
bin/magento2-updatewith the message:git commit -m "chore: bumps version to vX.X.X" git pushgit tag vX.X.Xgit push --tags- Create a new release with the name
vX.X.Xunder https://github.com/algolia/magento2-tools/releases/new.
Developers will get the new version via the
auto-updatemechanism of this tool.
magento2-tools is an open-sourced software licensed under the MIT license.