Skip to content

phil/dev-tools

alpha

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

PartState
Shared configurations, read through each package's phil-dev.phpImplemented and tested
init, new, check-docs, check-packages, infection, deptrac, witnesses, generateImplemented and tested
Per-package allowed dependencies, generated into DeptracImplemented and tested
Real servers, HTTP recordings, member autoloadingImplemented and tested
The version matrix, php and matrix, check-packages --symfonyImplemented and tested
The gates audit, unused, normalize, twig and js, ParaTest, the PHPStan extensionsImplemented and tested
taint, fuzz, sbom, bc, twigstanImplemented and tested
bench --baseline and --compare, bench:worker and the FrankenPHP serviceImplemented and tested
split, the CaptainHook configuration, lint-docs, hotspotsImplemented and tested
check-translations, stamp-translations, the French mirror of newImplemented and tested

Documentation

DocumentWhat it covers
Installation and usageInstalling, init, the Composer scripts, a new package.
CommandsEvery command and option of phil-dev.
ConfigurationHow the configurations are layered, and every section of phil-dev.php.
Quality gatesWhat each gate checks, which checks are scripts of their own, the PHPStan witnesses, the Infection modes, the French mirror.
Security checksThe advisories, the taint analysis of Psalm, fuzzing, the bill of materials.
BenchmarksPHPBench, the regressions against a baseline, the worker mode of FrankenPHP.
The monorepo workflowThe hooks, the split of the finished packages, the prose of the documentation, the hotspots.
DependenciesThe default every library may use, and what each package is allowed.
Real serversMySQL, PostgreSQL and Gotenberg in Docker, and their variables.
HTTP recordingsRecording and replaying HTTP services with the recorder of Symfony 8.2.
The version matrixThe PHP and Symfony versions, adding at RC1 and enforcing at x.y.1 (Symfony minor) or x.y.3.
The package skeletonWhat new writes, the wording, the CHANGELOG rule, the documentation checks.
The French glossaryThe words and the tone of the French documentation, in French.
The add-on conventionTagged services, extension points and when they are stable.
Extension pointsWhat a project may change in this package.
TestingThis package's tests, and the test helpers.
ReferenceEvery 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; 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.