symplify/rule-doc-generator
Generate consistent, readable documentation for custom PHP rules. Symplify Rule Doc Generator creates rule descriptions and examples automatically, helping you document PHPStan, Rector, or coding-standard rules quickly and keep docs in sync with code.
Do not use this package in new projects. It is explicitly deprecated and unmaintained. If you’re maintaining a legacy codebase that already uses symplify/rule-doc-generator, begin by:
composer.json for the dependency and inspect config/doc-generator.php or similar config files.bin/doc-generator or custom Symfony Console command).Your first action should be to plan migration to a supported alternative like Rector (with its rectorphp/rector-docs) or a hand-written, versioned docs system using structured docblocks.
In legacy setups, developers typically:
@rule-title, @rule-description, @rule-before, @rule-after).EarlyReturn, Strict).docs/rules.md on build, often with --check mode to fail if docs were stale.⚠️ If forced to extend:
src/Formatter/ classes (hardcoded logic).src/Parser/DocBlockResolver.php (likely uses deprecated phpdocumentor/reflection-docblock).templates/—but expect compatibility issues with modern PHP/Twig.Critical: Never add new rules using this generator. Migrate rule documentation to actively supported tools before expanding.
@see for rule examples), breaking IDE autocomplete and static analyzers.@phpstan-param) may crash generation. Test upgrades in a branch.grep -r '@rule-before' src/) as backup.Bottom line: Treat this as technical debt to be removed, not extended. Prioritize documenting rules inline with modern standards, and retire this package.
How can I help you explore Laravel packages today?