staabm/phpstan-todo-by
PHPStan extension that makes TODO/FIXME comments actionable: enforce issue links or due dates, flag expired TODOs, and catch malformed annotations during static analysis so postponed work doesn’t get forgotten.
Architecture fit
staabm/phpstan-todo-by is a PHPStan extension, not a Laravel package proper — it hooks into PHPStan's rule pipeline at static-analysis time and carries no runtime footprint. In a Laravel context that means it lands alongside Larastan and inherits whatever PHPStan level and config the team already runs. Its function is narrow and well-bounded: it converts TODO, FIXME, @todo and similar markers into analysable debt, optionally validating that referenced issue URLs exist and that date-based todos (TODO by 2025-01-01) have not lapsed. The 0.3.5 release adds a toggle to disable GitHub issue URL fetching, which removes the only outbound network dependency in the tool.
Integration feasibility
Low friction. composer require --dev staabm/phpstan-todo-by plus a phpstan.neon include, then it runs as part of the existing phpstan analyse invocation. No service container bindings, no migrations, no config publishing, no middleware. Works on the same PHP versions PHPStan supports, so it slots into existing CI images without new tooling.
Technical risk
phpstan.neon; nothing in production breaks.Key questions
Stack fit
Add as a require-dev dependency in Laravel applications and in shared internal packages. It pairs naturally with Larastan: Larastan covers type and framework correctness, phpstan-todo-by covers debt hygiene. No production dependency, so composer install --no-dev in deploy images is unaffected.
Migration path
phpstan.neon with URL fetching disabled (per 0.3.5) to keep builds hermetic.Compatibility Requires a PHPStan version in the extension's supported range — verify against the current Larastan-pinned PHPStan before installing, since Larastan constrains PHPStan's major version. PHP 8.x only in practice. The GitHub-fetch toggle is additive and backwards compatible; no config migration needed from 0.3.4.
Sequencing
Pilot in a single high-traffic application for one sprint → confirm signal quality and CI timing impact → adopt in shared packages → roll out org-wide via a reusable CI workflow and a common phpstan.neon fragment. Keep the extension version pinned in lockfile; upgrade deliberately, not via auto-merge on 0.x.
Maintenance
Minimal. The extension has no runtime surface, no database, no scheduled work. Recurring cost is dependency-bump review — this release alone shows five Dependabot action bumps and one pinning change, indicating active maintenance and automated hygiene. Assign ownership of the phpstan.neon fragment to the platform/tooling team.
Support Support burden is developer-facing only: "why did my build fail on a TODO comment?" Answer is a one-line policy doc plus the baseline escape hatch. No on-call implications.
Scaling Scales linearly with analysis time and is negligible against Larastan's own cost. Disabling URL fetching (0.3.5) removes the one component that would degrade at scale — a monorepo with hundreds of issue references would otherwise issue hundreds of API calls per run and hit rate limits.
Failure modes
Ramp-up
Under an hour for a developer familiar with PHPStan config. The only non-obvious step is baselining. Recommend a short internal note covering: install command, the phpstan.neon include, the URL-fetch toggle, baseline generation, and the TODO format convention the team agrees to standardise on.
How can I help you explore Laravel packages today?