algolia / magento2-tools
Tools for magento 2 developers
Requires
- bitexpert/phpstan-magento: ^0.32
- friendsofphp/php-cs-fixer: ^3.0
- phpcompatibility/php-compatibility: ^9.3
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.4
- squizlabs/php_codesniffer: ^3.5
- dev-master
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-feat/MAGE-1550-modernize-tooling
- dev-update/php-compatability-path
- dev-update/phpcompatibility-update
- dev-update/tag.0.2.9
- dev-update/magento-tool-phpcompatibility-update
- dev-chores/remove-phpstan
This package is auto-updated.
Last update: 2026-03-24 19:59:06 UTC
README
The perfect starting point to analyse the PHP quality of our Algolia Magento 2 extension
💡 Getting Started
First, install globally the magento2-tools:
composer global require algolia/magento2-tools
Make 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/extension [vendor/bin/path/]
The second argument is optional. If omitted, the scripts will attempt to auto-resolve the vendor bin directory by checking for a local vendor/bin/ install (e.g. after running composer install in the package directory) and then falling back to the global Composer vendor bin. If neither is found, the tools are expected to be on your $PATH.
Here is the list of available commands:
-
magento2-lint: Runs the linter and fixes the found issues - configuration file underalgoliasearch-magento-2/.php-cs-fixer.php. -
magento2-analyse: Runs PHPStan static analysis. Usesphpstan.neonorphpstan.neon.distfrom the extension directory if present; otherwise runs at level 1 with sensible defaults. -
magento2-php-compatibility: Checks if your code is compatible across all PHP versions supported by Magento. -
magento2-test: Runs all previous commands in--dry-run/ read-only mode (coding style, PHP compatibility, and PHPStan analysis).
Release process
- 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.
📄 License
magento2-tools is an open-sourced software licensed under the MIT license.