Search by

phil / dev-tools

philSocolin

Shared development tooling for PHIL and Tilttek packages: quality-tool configurations, Composer scripts, documentation checks and the package skeleton.

0.4.0-alpha 2026-12-02 22:00 UTC

README

Shared development tooling for PHIL and Tilttek packages: quality-tool configurations, Composer scripts, documentation checks and the package skeleton.

phil/dev-tools holds, once, what every PHIL and Tilttek package checks itself with: the configurations of PHP-CS-Fixer, PHPStan and its extensions, Rector, Deptrac, Arkitect, Infection, PHPUnit with ParaTest and PHPBench, the gates of the dependencies, of the Twig templates and of the scripts, the security checks — the taint analysis, fuzzing, the advisories and the bill of materials —, the backward-compatibility check, the Composer scripts that run them, the documentation checks, the standalone check of each package, the real servers of the integration tests, the HTTP recordings that replay them offline, the benchmarks, the hooks and the split of a monorepo, the matrix of PHP and Symfony versions, and the skeleton of a new package.

A package installs it in require-dev and runs vendor/bin/phil-dev init, which writes thin configuration files that call the shared ones. Each package keeps its own paths and exceptions in a small phil-dev.php; in a monorepo, the shared configurations find every package through its own files, so adding a package touches no file of the root and several batches can work at once in their own worktrees.

Status

Part State
Shared configurations, read through each package's phil-dev.php Implemented and tested
init, new, check-docs, check-packages, check-config, infection, deptrac, witnesses, generate Implemented and tested
The regex generator of the fuzz targets Implemented and tested
Per-package allowed dependencies, generated into Deptrac Implemented and tested
Real servers, HTTP recordings, member autoloading Implemented and tested
The version matrix, php and matrix, check-packages --symfony Implemented and tested
The gates audit, unused, normalize, twig and js, ParaTest, the PHPStan extensions Implemented and tested
taint, fuzz, sbom, bc, twigstan Implemented and tested
bench --baseline and --compare, bench:worker and the FrankenPHP service, the bench-ext image Implemented and tested
split, the CaptainHook configuration, staged and hooks, lint-docs and its French dictionary, hotspots Implemented and tested
merge-lot: the merge of a lot into main, its lock, its gates and its cleanup, stopping at the first failure Implemented and tested
The security files of a split repository (Dependabot, OpenSSF Scorecard, zizmor), its badge, split --security-files, the Dependabot and zizmor files of a monorepo, the Snyk policy of a public monorepo Implemented and tested
lint-apps: lint:container, lint:expressions, lint:translations and lint:yaml on each functional test application Implemented and tested
lsp: the diagnostics of Symfony Language Tools on each Symfony application, every code blocking Implemented and tested
check-translations, stamp-translations, the French mirror of new Implemented and tested
check-catalogs: the ICU messages, plural categories, pipe plurals and English and French keys of the translation catalogs Implemented and tested
quiet: the locked packages without a release for more than 24 months, each kept one with its reason Implemented and tested
test --random, the seed printed for a replay; FreePort, the free ports of a browser suite Implemented and tested

Documentation

Document What it covers
Installation and usage Installing, init, the Composer scripts, a new package.
Commands Every command and option of phil-dev.
Configuration How the configurations are layered, and every section of phil-dev.php.
Quality gates What each gate checks, which checks are scripts of their own, the PHPStan witnesses, the Infection modes, the French mirror.
Security checks The advisories, the taint analysis of Psalm, fuzzing, the bill of materials.
Benchmarks PHPBench, the regressions against a baseline, the worker mode of FrankenPHP.
The monorepo workflow The hooks, the merge of a lot, the split of the finished packages and their security files, those of a monorepo, the prose of the documentation, the hotspots.
Dependencies The default every library may use, and what each package is allowed.
Real servers MySQL, PostgreSQL and Gotenberg in Docker, and their variables.
HTTP recordings Recording and replaying HTTP services with the recorder of Symfony 8.2.
The version matrix The PHP and Symfony versions, adding at RC1 and enforcing at x.y.1 (Symfony minor) or x.y.3.
The package skeleton What new writes, the wording, the CHANGELOG rule, the documentation checks.
The French glossary The words and the tone of the French documentation, in French.
The add-on convention Tagged services, extension points and when they are stable.
Extension points What a project may change in this package.
Testing This package's tests, and the test helpers, the route smoke test included.
Castor tasks The common Castor tasks of an application: tests, coverage, lints, fixers, CI.
Reference Every class and file of the package.

Quick start

composer require --dev phil/dev-tools
vendor/bin/phil-dev init
composer update
composer deps:normalize:fix
composer hooks
composer gates

Requirements

PHP 8.5 or later; the Symfony CLI for the lsp gate; Docker for the real servers, FrankenPHP and the next PHP of the matrix; git for the split; cspell, markdownlint-cli2 and Vale, or Node.js for the first two, to lint the prose of the documentation.

Contributing

Contributions are welcome: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.