prinsfrank/phpstan-doc-code-analyzer
Analyze and validate PHP code examples in your documentation using PHPStan. This package scans doc blocks and docs for code snippets, runs static analysis, and helps catch outdated or incorrect examples early in CI.
Adopt if:
Look elsewhere if:
For Executives/Product Leaders: "This tool automates a critical but often overlooked part of developer experience: ensuring the code examples in our documentation actually work. Think of it like a spell-checker for programmers—catching typos, deprecated functions, or type errors in snippets before users encounter them. For projects where our library/package’s documentation is a key differentiator (e.g., [Laravel ecosystem tools]), this reduces support tickets from confused users and strengthens our reputation for reliability. It’s a low-effort, high-impact way to align our docs with our code, especially if we’re already using PHPStan in our pipeline. The cost? Minimal—just a few minutes to integrate into CI, with payoffs in reduced tech debt and happier developers."
For Engineering Teams: *"We’re adding a lightweight PHPStan extension to validate code snippets in our docs (READMEs, API docs, etc.). This will:
How can I help you explore Laravel packages today?