nowo-tech/phpstan-frankenphp
PHPStan support for FrankenPHP projects. Ships stubs and rules covering frankenphp_* functions, worker-mode globals and runtime constants, so static analysis understands your FrankenPHP app and flags type errors early. Install with Composer and register the extension in phpstan.neon.
Adopt when most of the following hold:
Look elsewhere or defer when:
To executives: FrankenPHP is a credible path to better PHP performance and simpler deployment, but the migration's real risk is not the runtime — it is latent assumptions in our code about how long a process lives. This package turns that risk into a measurable, staged checklist enforced automatically in CI, so we can migrate service by service with evidence instead of optimism. It is MIT-licensed, free, and static-only: it cannot affect production behavior, and we can pilot it and walk away at near-zero cost. The trade-off is maturity — it is an early-stage project, so we should treat it as an accelerator we own internally rather than a supported vendor product.
To engineering: This is a leveled set of PHPStan rules purpose-built for the FPM → FrankenPHP classic → worker-mode path, with demo cases for each rule. It plugs into the PHPStan setup we already run, lets us start in report-only mode and ratchet up to blocking, and gives us a shared, objective definition of "worker-safe." Expect to review the rules and possibly fork given the project's low adoption; budget a small spike to validate coverage against our codebase before making it a required gate.
How can I help you explore Laravel packages today?