Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phpstan Extension Laravel Package

php-standard-library/phpstan-extension

PHPStan extension for the PHP Standard Library (PSL) that teaches PHPStan about PSL types, generics, and collection APIs. It improves type inference, adds custom rules, reduces false positives, and catches PSL-specific errors during static analysis for safer, more reliable PHP code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Static-analysis investment: Supports the decision to make PHPStan a CI quality gate when our Laravel/PHP code uses PHP Standard Library (PSL) types. This extension helps PHPStan understand PSL constructs, reducing false positives and suppressions.
  • Build vs. buy: Treat it as a narrow, dev-only OSS dependency rather than building custom PHPStan stubs for PSL. If PSL is strategic, adopt and pin this package; if PSL is not in the stack, do not introduce it.
  • Roadmap sequencing: Prioritize a PHPStan baseline and a small PSL pilot before relying on this extension. Use it to validate typed domain/service layers, safer refactors, and better PR review.
  • Use cases: Laravel/PHP services with complex collections/domain types, teams standardizing on PSL, platform templates for new services, and CI quality dashboards.
  • Success metrics: Fewer ignored PHPStan errors, lower false-positive rate, reduced type-related defects, faster refactor cycles, and clearer onboarding for engineers.

When to Consider This Package

  • Consider it when: PHPStan is already used or planned; PSL is present or being evaluated; the extension supports our PHP, Laravel, and PHPStan versions; and the team can pin versions and review release notes.
  • Adoption criteria: Start as a dev dependency in one non-critical service, run it alongside the existing PHPStan baseline, and compare error counts, false positives, and upgrade friction before wider rollout.
  • Look elsewhere when: There is no PSL usage, the team uses Psalm/IDE-only analysis, we need a mature ecosystem or vendor SLA, the package is incompatible with current tooling, or maintenance appears stalled. The low star count is a signal to keep reliance tactical, not strategic.
  • Risk posture: Acceptable for developer tooling if pinned and isolated from production runtime; not acceptable as a critical-path dependency without a fallback plan.

How to Pitch It (Stakeholders)

  • Executives: This is a low-cost developer-productivity and code-quality enabler, not a customer-facing feature. It improves static analysis accuracy when we use PSL, which can reduce type-related defects and make refactors safer. Risk is contained because it is dev-only; the small ecosystem means we should pilot, pin, and avoid strategic reliance.
  • Engineering: Add it as a dev dependency, wire it into PHPStan, baseline current errors, and gate new errors in CI. Track false positives, suppressions removed, and upgrade effort. If PSL is not part of our stack, defer adoption.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console