nowo-tech/phpstan-frankenphp
PHPStan rules that help you migrate from PHP-FPM to FrankenPHP classic, then to worker mode. Rules are split by level with demos for every case.
v1.1.2
27K downloads/mo
#4382 most downloaded on Packagist
nowo-tech/PhpStanFrankenPhp
What this package is like to depend on
Last release 4 days ago
19 Aug 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
1 months old
7 releases · first in 2026
7 releases in the last 12 months
see the full history below
Release timeline
7 releases · Jul 2026 to Aug 2026Releases
latest 7-
v1.1.219 Aug 2026Release notes
Open source →Release v1.1.2: composer audit CI
Changelog
Security
- CI: run
composer audit --lockedafter dependency install (REQ-SEC / P3).
Commits
Release notes
Open source →Security
- CI: run
composer audit --lockedafter dependency install (REQ-SEC / P3).
- CI: run
-
v1.1.118 Aug 2026Release notes
Open source →Release v1.1.1: Symfony 8 demos and Hot Reload 1.4.
Changelog
Changed
- Demos: pin
nowo-tech/hot-reload-bundleto^1.4with FrankenPHP Mercure/hot_reload(dev/testonly).
Commits
Release notes
Open source →Changed
- Demos: pin
nowo-tech/hot-reload-bundleto^1.4with FrankenPHP Mercure/hot_reload(dev/testonly).
- Demos: pin
-
v1.1.011 Aug 2026Release notes
Open source →Release v1.1.0 - Worker process-state rules and pcntl signal hardening
Changelog
Added
- Worker rules for process-wide state that survives FrankenPHP worker requests:
NoChdirRule(frankenphp.worker.noChdir)NoSetLocaleRule(frankenphp.worker.noSetLocale) — queries viasetlocale($category, 0|"0")allowedNoLocaleSetDefaultRule(frankenphp.worker.noLocaleSetDefault) —locale_set_default()/Locale::setDefault()NoDateDefaultTimezoneSetRule(frankenphp.worker.noDateDefaultTimezoneSet)NoMbEncodingMutationRule(frankenphp.worker.noMbEncodingMutation) —mb_internal_encoding/mb_regex_encoding/mb_http_output/mb_languagewith an argument; no-arg reads allowedNoErrorReportingMutationRule(frankenphp.worker.noErrorReportingMutation)NoUmaskRule(frankenphp.worker.noUmask)
- Hardening rule:
NoPcntlSignalRule(frankenphp.hardening.noPcntlSignal) —pcntl_signal,pcntl_async_signals,pcntl_signal_dispatch,pcntl_signal_get_handler,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_alarm - Fixture demos, Symfony 8 anti-patterns, RuleTestCase coverage, and catalog updates in
RULES.md ROADMAP.mdfor planned expansions and explicit non-goals
Notes
- Consumer action required if you already enable
ruleset-worker.neonand/orruleset-hardening.neon: re-run PHPStan and fix or baseline the new identifiers. SeeUPGRADING.md. - Continue requiring
nowo-tech/phpstan-frankenphp: ^1.0(1.1.0 is a compatible minor).
Commits
- Release v1.1.0: worker process-state rules and pcntl signal hardening. (37c1e75)
Release notes
Open source →Added
- Worker rules for process-wide state that survives FrankenPHP worker requests:
NoChdirRule(frankenphp.worker.noChdir)NoSetLocaleRule(frankenphp.worker.noSetLocale) — queries viasetlocale($category, 0|"0")allowedNoLocaleSetDefaultRule(frankenphp.worker.noLocaleSetDefault) —locale_set_default()/Locale::setDefault()NoDateDefaultTimezoneSetRule(frankenphp.worker.noDateDefaultTimezoneSet)NoMbEncodingMutationRule(frankenphp.worker.noMbEncodingMutation) —mb_internal_encoding/mb_regex_encoding/mb_http_output/mb_languagewith an argument; no-arg reads allowedNoErrorReportingMutationRule(frankenphp.worker.noErrorReportingMutation)NoUmaskRule(frankenphp.worker.noUmask)
- Hardening rule:
NoPcntlSignalRule(frankenphp.hardening.noPcntlSignal) —pcntl_signal,pcntl_async_signals,pcntl_signal_dispatch,pcntl_signal_get_handler,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_alarm - Fixture demos, Symfony 8 anti-patterns, RuleTestCase coverage, and catalog updates in
RULES.md ROADMAP.mdfor planned expansions and explicit non-goals
Notes
- Consumer action required if you already enable
ruleset-worker.neonand/orruleset-hardening.neon: re-run PHPStan and fix or baseline the new identifiers. SeeUPGRADING.md. - Continue requiring
nowo-tech/phpstan-frankenphp: ^1.0(1.1.0 is a compatible minor).
- Worker rules for process-wide state that survives FrankenPHP worker requests:
-
v1.0.303 Aug 2026Release notes
Open source →Release v1.0.3 - Spec Kit deep baseline and Cursor Agent scaffold
Changelog
Added
- GitHub Spec Kit Cursor Agent scaffold under
.specify/(constitution, templates, workflows) .github/copilot-instructions.mdfor maintainer/agent conventions
Changed
- Deep Spec Kit baseline:
specs/001-baseline/spec.mdwith semanticFR-*requirements and user scenarios;code-inventory.mdmaps 20/20 production PHP files undersrc/(REQ-SPECKIT-003) - CI: bump
actions/stalefrom v10 to v11 - Internal Rector/CS cleanups (exclusive type checks); skip
ReduceAlwaysFalseIfOrRectorsoprocessNodeinstanceof guards stay for early-return coverage; no public API or reported-error changes
Notes
- No rule behaviour changes and no consumer action required. Continue requiring
nowo-tech/phpstan-frankenphp: ^1.0.
Commits
Release notes
Open source →Added
- GitHub Spec Kit Cursor Agent scaffold under
.specify/(constitution, templates, workflows) .github/copilot-instructions.mdfor maintainer/agent conventions
Changed
- Deep Spec Kit baseline:
specs/001-baseline/spec.mdwith semanticFR-*requirements and user scenarios;code-inventory.mdmaps 20/20 production PHP files undersrc/(REQ-SPECKIT-003) - CI: bump
actions/stalefrom v10 to v11 - Internal Rector/CS cleanups (exclusive type checks); skip
ReduceAlwaysFalseIfOrRectorsoprocessNodeinstanceof guards stay for early-return coverage; no public API or reported-error changes
Notes
- No rule behaviour changes and no consumer action required. Continue requiring
nowo-tech/phpstan-frankenphp: ^1.0.
- GitHub Spec Kit Cursor Agent scaffold under
-
v1.0.229 Jul 2026Release notes
Open source →Release v1.0.2 - FrankenPHP banner, Make demos/smoke, security checklist
Changelog
Added
- FrankenPHP-friendly banner in README (
docs/images/frankenphp-friendly.png) - Make targets:
check-open-prs,demo-smoke; Compose V2→V1 detection (REQ-MAKE-010) - Demo Symfony 8:
DebugBundle+ Twig Inspector;update-bundle;SYMFONY_DEPRECATIONS_HELPER=max[direct]=0 - Explicit
ignoreErrors: []inphpstan.neon.dist; release security checklist (12.4.1) indocs/SECURITY.md
Changed
- GitHub About / Packagist description shortened for clarity
Commits
- chore(release): prepare 1.0.2 (8edcc44)
Release notes
Open source →Added
- FrankenPHP-friendly banner in README (
docs/images/frankenphp-friendly.png) - Make targets:
check-open-prs,demo-smoke; Compose V2→V1 detection (REQ-MAKE-010) - Demo Symfony 8:
DebugBundle+ Twig Inspector;update-bundle;SYMFONY_DEPRECATIONS_HELPER=max[direct]=0 - Explicit
ignoreErrors: []inphpstan.neon.dist; release security checklist (12.4.1) indocs/SECURITY.md
Changed
- GitHub About / Packagist description shortened for clarity
- FrankenPHP-friendly banner in README (
-
v1.0.122 Jul 2026Release notes
Open source →Release v1.0.1
Documentation: remediations remain PHP-FPM compatible.
Changelog
Documentation
- Clarified that rule remediations remain PHP-FPM compatible: they harden the app for FrankenPHP classic/worker without requiring FrankenPHP-only APIs, and remain valid under FPM (MIGRATION.md, RULES.md, USAGE.md, README).
Commits
- Release v1.0.1: document FPM-compatible remediations. (c27fbbe)
Release notes
Open source →Documentation
- Clarified that rule remediations remain PHP-FPM compatible: they harden the app for FrankenPHP classic/worker without requiring FrankenPHP-only APIs, and remain valid under FPM (MIGRATION.md, RULES.md, USAGE.md, README).
-
v1.0.022 Jul 2026Release notes
Open source →Release v1.0.0
First stable release of nowo-tech/phpstan-frankenphp:
classic, worker, worker-strict, and hardening PHPStan rulesets,
fixture demos, Symfony 8 FrankenPHP demo, 100% coverage gate.Changelog
- 2026-07-22
Release notes
Open source →First stable release of
nowo-tech/phpstan-frankenphp: PHPStan rules to migrate from PHP-FPM to FrankenPHP classic, then worker mode.Added
- PHPStan extension (
type: phpstan-extension) withextension.neon(schema/defaults only; rules are not auto-enabled). - Level 1 — classic (
ruleset-classic.neon):exit/die,fastcgi_finish_request,putenv,ignore_user_abort, unlimited I/O timeouts. - Level 2 — worker (
ruleset-worker.neon): mutable statics, static locals, globals,$_ENV/$_SESSION, native session API, persistentini_set, singletons,register_shutdown_function,set_error_handler/set_exception_handler. - Level 2b — worker-strict (
ruleset-worker-strict.neon) and parameterfrankenphp.flagRequestSuperglobals(defaultfalse) to also flag$_GET/$_POST/…. - Level 3 — hardening (
ruleset-hardening.neon):set_time_limit(0),memory_limit -1,pcntl_fork, blockingsleep,register_tick_function. - Aggregate ruleset
rules.neon(classic + worker + hardening). - Fixture demos under
demo/{classic,worker,hardening}/{bad,good}with Composer/Make targets (demo-*,demo-*-good). - Symfony 8 + FrankenPHP demo (
demo/symfony8) withFRANKENPHP_MODE=workerby default, anti-patterns, and leveled PHPStan configs. - Documentation: RULES, MIGRATION, INSTALLATION, CONFIGURATION, USAGE, DEMO-FRANKENPHP, RELEASE, Spec Kit baseline (
specs/001-baseline/). - QA: PHPUnit RuleTestCase + unit/integration suites, 100% line coverage on
src/,coverage-check/test-coverage-100, CI matrix PHP 8.2–8.5,release-check+release-check-demos.
Changed
NoSuperglobalAccessRuledefaults to$_ENV+$_SESSIONonly (aligned with FrankenPHP worker reset behaviour); request superglobals are opt-in via worker-strict /flagRequestSuperglobals.- Mutable static guidance no longer recommends invalid
readonly staticproperties.