Repository-by-repository, in dependency order, using phpdb-validator as the template.
Install the Mago binary once per machine (see the README).
composer remove --dev laminas/laminas-coding-standard
# also remove psalm/psalm, vimeo/psalm, or phpstan/phpstan if present
composer require --dev php-db/phpdb-qa-toolsrm -f phpcs.xml phpcs.xml.dist .phpcs-cacheAlso remove any psalm.xml / phpstan.neon and their baselines.
extends = "vendor/php-db/phpdb-qa-tools/mago.toml"
php-version = "8.2.0"
[source]
paths = ["src", "test"]
includes = ["vendor"]Append repository-specific [analyzer] settings (e.g. class-initializers) as needed.
cp vendor/php-db/phpdb-qa-tools/templates/phpunit.xml.dist .Adjust test-suite paths only if the repository cannot follow the standard
test/unit / test/integration layout.
Adopt the standard check / cs-check / cs-fix / static-analysis / test
scripts (see the README).
composer cs-fix
git add -A
git commit -m "Apply mago formatting"
git rev-parse HEAD >> .git-blame-ignore-revs
git add .git-blame-ignore-revs
git commit -m "Ignore mago reformat in git blame"Keeping the mechanical reformat isolated (and recorded in .git-blame-ignore-revs)
keeps git blame useful.
Fix or explicitly suppress remaining lint/analyzer findings in follow-up commits.
Large repositories may temporarily relax specific rules in their local mago.toml
(child settings override the base) — open a tracking issue to remove the relaxation.
Replace the phpcs/psalm workflow steps with the standard QA workflow (see the README).