algolia/magento2-tools

Tools for magento 2 developers

Maintainers

Package info

github.com/algolia/magento2-tools

Language:Shell

pkg:composer/algolia/magento2-tools

Statistics

Installs: 2 247

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 0

v0.4.0 2026-03-24 19:55 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 under algoliasearch-magento-2/.php-cs-fixer.php.

  • magento2-analyse: Runs PHPStan static analysis. Uses phpstan.neon or phpstan.neon.dist from 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 --list to check the latest release

  • Bump version in the file bin/magento2-update
  • Commit the bin/magento2-update with the message: git commit -m "chore: bumps version to vX.X.X"
  • git push
  • git tag vX.X.X
  • git push --tags
  • Create a new release with the name vX.X.X under https://github.com/algolia/magento2-tools/releases/new.

Developers will get the new version via the auto-update mechanism of this tool.

📄 License

magento2-tools is an open-sourced software licensed under the MIT license.