hattabgroup / qa-impact
Turns changes in a Git repository into evidence-backed regression checklists.
Requires
- php: ^8.3
- ext-dom: *
- ext-libxml: *
- ext-pdo_sqlite: *
- nikic/php-parser: ^5.7
- symfony/console: ^7.4 || ^8.0
- symfony/process: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- opis/json-schema: ^2.4
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-02 10:39:02 UTC
README
QA Impact is an open-source PHP CLI that turns changes in a Git repository into evidence-backed regression checklists. Magento 2 is the first framework adapter. The core works offline, with no AI.
Status: early development. Stages 1–7 of 10 are complete: a runnable CLI, configuration loading, Git change detection (
qa-impact changes), PHP symbol analysis (qa-impact symbols:changed), the SQLite dependency index (qa-impact index:build), the Magento adapter (modules, DI per area, plugins, entry points including pages by layout handle), change impact analysis (qa-impact analyze), and the QA checklist: an optional scenario catalog, questions for uncovered entry points, linked tests, and the frozen v1 JSON result. Stage 8, GitLab CI and reports per deployment, is in progress. See docs/stages/ for the staged plan, docs/support-matrix.md for what is supported, docs/scenarios.md for writing a scenario catalog, and docs/ci.md for running it in GitLab CI.
Requirements
- PHP 8.3 or newer (8.3, 8.4 and 8.5 are tested), with
dom,libxmlandpdo_sqlite(the index needs SQLite) - Git 2.30 or newer
- Composer 2
Install
Docker. This needs no PHP on the machine. Images are published for every release at ghcr.io/hattabgroup/qa-impact:
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:$PWD" -w "$PWD" ghcr.io/hattabgroup/qa-impact:<version> qa-impact --version
Composer:
composer create-project --no-dev hattabgroup/qa-impact /opt/qa-impact
/opt/qa-impact/bin/qa-impact --version
From source:
git clone https://github.com/hattabgroup/qa-impact.git
cd qa-impact
composer install
bin/qa-impact --version # QA Impact 0.1.0-dev
To run it in GitLab CI, see docs/ci.md.
Install QA Impact standalone, not as a require-dev dependency of the project you analyse. The tool reads the target repository from --repo:
bin/qa-impact config:dump --repo=/path/to/your/project
bin/qa-impact changes --repo=/path/to/your/project --base=v1.2.0 --head=v1.3.0
bin/qa-impact changes --repo=/path/to/your/project --mr --target=origin/main --format=json
bin/qa-impact symbols:changed --repo=/path/to/your/project --base=v1.2.0 --head=v1.3.0
bin/qa-impact symbols:file app/code/Acme/Shop/Model/Cart.php --repo=/path/to/your/project --rev=HEAD
bin/qa-impact index:build --repo=/path/to/your/project --rev=HEAD
bin/qa-impact index:callers 'Acme\Shop\Model\Cart::save()' --repo=/path/to/your/project
bin/qa-impact magento:modules --repo=/path/to/your/project
bin/qa-impact magento:bindings 'Magento\Catalog\Api\ProductRepositoryInterface' --repo=/path/to/your/project
bin/qa-impact magento:entry-points --kind=rest --repo=/path/to/your/project
bin/qa-impact index:issues --repo=/path/to/your/project
bin/qa-impact analyze --repo=/path/to/your/project --base=v1.2.0 --head=v1.3.0 --out=qa-impact-out
bin/qa-impact analyze --repo=/path/to/your/project --deployed --environment=dev --state-file=/var/lib/qa-impact/dev --head=<deployed commit> --out=qa-impact-out
bin/qa-impact scenarios:validate --repo=/path/to/your/project qa/checkout.yml
bin/qa-impact report:render qa-impact-out/qa-impact.json
analyze writes qa-impact-out/qa-impact.json (schema v1) and qa-impact-out/qa-impact.md, a checklist for QA:
- Scenarios to run. Scenarios from your team's catalog (
scenarios.catalogs, see docs/scenarios.md) that the change reaches, by business priority. Each has steps, expected outcomes and a "why" line with the evidence. - Entry points without a scenario. REST and SOAP services, controllers, cron jobs, queue consumers and GraphQL fields the change reaches that no scenario names. Each has a question for QA. Without a catalog, every reached entry point is listed here.
- What changed and linked tests. The changed symbols and configuration, and the tests that reference the changed code.
- Evidence. The shortest path to each entry point, with revision, file and line for every hop.
- Caveats. The places the trace could not follow, possible callers it could not prove, where traces stopped, and the affected modules.
With --deployed, the base is the last deployed commit, read from --state-file (or --base on the first run). The report is split by merge request, and a rollback or force push is labelled. Once the report is written, the deployed commit is recorded in the state file. See docs/ci.md.
Without --out, the Markdown report is printed (--format=json prints the JSON). The index is built for both revisions as needed. Exit code 3 means the result is partial, and the report says why.
The target repository is only read. Nothing is checked out, fetched or written. The working tree is read only for an installed vendor/ (all of it when its composer.lock matches the revision, otherwise only the packages locked at the same version), and for a git-ignored app/etc/config.php.
Development
The tool's own checks run in Docker, so the host PHP version does not matter:
make install
make check # php-cs-fixer, phpstan (level 8), phpunit on PHP 8.3
make check PHP=8.5
make check-all # 8.3, 8.4 and 8.5
Exit codes
| Code | Meaning |
|---|---|
| 0 | Completed |
| 1 | Internal error |
| 2 | Usage, input or configuration error |
| 3 | Completed with partial results |
| 4 | Git history unavailable (deepen the fetch and retry) |
| 5 | Transient resource error (retry) |
Contributing
Contributions are welcome: bug reports, reports of wrong results, fixes, and support for more Magento features and frameworks. Read CONTRIBUTING.md to get started. Report a wrong result with the inaccurate finding form, and security problems as described in SECURITY.md. Everyone taking part follows the Code of Conduct.
License
QA Impact is released under the MIT License.