
A few weeks ago, we introduced a new Extension Verifier tool in the Shopware Review Bazaar. This tool is designed to help developers lint, format, and refactor their extensions, ensuring compliance with best practices and improving overall code quality. Additionally, it provides detailed reports and suggestions for improvement, making the development process more efficient and effective. We are also experimenting with some large language models (LLMs) to provide even more advanced suggestions and improvements.
What is Extension Verifier?
The Extension Verifier is a standalone tool that can lint, format, and refactor extensions or entire projects. It's published as a single Docker image containing all linters and configurations and can run on any extension without configuration.
What's the goal of the Extension Verifier?
The goal of the Extension Verifier is to provide developers with a comprehensive set of tools to ensure their extensions are compliant with best practices in an easy way. Setting up tools like PHPStan, CSFixer, and ESlint can be time-consuming and error-prone. The Extension Verifier simplifies this process by providing a single tool that utilizes those tools under the hood and provides a consistent interface for developers. This allows developers to focus on writing code rather than configuring tools, ultimately leading to better code quality and faster development cycles. While wrapping those tools, we still allow developers to customize configurations as needed.
How to use Extension Verifier
To run the Extension Verifier, you will need first [Docker](https://www.docker.com/get-started) installed on your machine. Once Docker is set up, you can pull the Extension Verifier image and start using it.
docker run --rm -v $(pwd):/ext ghcr.io/shopwarelabs/extension-verifier:latest format /ext
This command will run the Extension Verifier on the current directory, which should contain your extension. The `format`
command will format the code according to the best practices and standards defined in the tool.
You can also use the `lint` command to check for any linting issues in your code:
docker run --rm -v $(pwd):/ext ghcr.io/shopwarelabs/extension-verifier:latest check /ext
The `check`
command will analyze your code and provide a report of any issues found, including suggestions for improvement. This can help you identify and fix potential problems before they become more significant issues.
We also support multiple reporting formats, so you can integrate the result also into your CI/CD pipeline for continuous feedback and improvement. See the documentation for more details.
Automatic Refactoring
The Extension Verifier also provides an automatic refactoring feature that can help you improve your code quality and compliance with best practices. This feature uses Rector for PHP and ESLint for JavaScript/TypeScript with automatic fixes to refactor your code automatically. This can save you time and effort, allowing you to focus on more critical aspects of your development process.
To use the automatic refactoring feature, you can run the following command:
docker run --rm -v $(pwd):/ext ghcr.io/shopwarelabs/extension-verifier:latest fix /ext
Upgrading Twig templates using Large Language Models
The Extension Verifier also provides an experimental feature that uses large language models (LLMs) to upgrade your Twig templates. This feature is still in the early stages of development, but it shows promise in helping developers improve their code quality and compliance with best practices.
We will collect the old twig template, the new one, and your Twig extension and send them to the LLM. The LLM will then return a new twig template that is compliant with the best practices and standards defined in the tool. This can help you upgrade your templates quickly and efficiently, ensuring they are current with the latest standards.
Currently, we are supporting three different LLMs:
Google Gemini
OpenRouter (collection of LLMs)
Ollama (or any local OpenAI compatible API)
In our tests, Google Gemini 2.5 Pro provided the best experience, but we are still experimenting with the other LLMs. You can choose the LLM you want to use.
docker run --rm -v $(pwd):/ext ghcr.io/shopwarelabs/extension-verifier:latest twig-upgrade /ext 6.6.0.0 6.7.0.0-rc1 --provider gemini --model gemini-2.5-pro-exp-03-25
The command will use `6.6.0.0` as the old version and `6.7.0.0-rc1` as the new version for the upgrade process.
Here we have an example of a twig template before and after the upgrade process:

Usage in CI/CD
For GitHub Actions, we provide a ready-to-use GitHub Action that you can use in your workflow. This action will run the Extension Verifier on your code and give a report of any issues found. Before merging it into your main branch, you can use this action to ensure your code complies with best practices and standards.
jobs:
check:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
version-selection: [ 'lowest', 'highest']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check extension
uses: shopware/github-actions/extension-verifier@main
with:
action: check
check-against: ${{ matrix.version-selection }}
For any other CI system, you can use the Docker image directly in your pipeline.
Conclusion
The Extension Verifier is a powerful tool that can help developers lint, format, and refactor their extensions quickly and efficiently. By providing a single tool that utilizes multiple linters and formatters, the Extension Verifier simplifies the development process and ensures compliance with best practices. The automatic refactoring feature and LLM integration further enhance the tool's capabilities, making it an invaluable resource for developers looking to improve their code quality and efficiency. To get started with the Extension Verifier, please visit the Shopware Developer documentation.