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

Technical Evaluation

  • Architecture fit: This is a dev-time PHPStan extension for PHP Standard Library (PSL), not a Laravel runtime package. It fits naturally into a Composer-based Laravel codebase only if the application or shared packages already use PSL types/APIs. If the stack relies on Laravel collections, native PHP, and Larastan alone, the value is marginal.
  • Integration feasibility: High when PHPStan/Larastan is already in CI. Adoption is typically a require-dev dependency plus a PHPStan config include. No production code path changes and no runtime deployment impact.
  • Technical risk: Low production risk; moderate static-analysis/CI risk. The package has only 24 stars and an unknown repository source in the supplied metadata, so provenance, license, and maintainer responsiveness must be verified. Main risks are PHPStan/Larastan/PSL version coupling, rule conflicts, false positives, and limited community support despite a recent release date.
  • Key questions: Are any Laravel services actually using PSL? Which PHP, PHPStan, Larastan, and PSL versions are targeted? Is the source repository and license trusted? Does the extension require PSL at runtime or only static stubs/rules? What is the impact on PHPStan error count and analysis time? Can we pin and roll back cleanly? Is the repository metadata reliable?

Integration Approach

  • Stack fit: Compatible with Laravel’s Composer workflow and PHPStan/Larastan CI jobs. Install as a dev dependency and include the extension via phpstan/extension-installer or an explicit includes entry in phpstan.neon.
  • Migration path: Pilot in one Laravel app or shared package. Capture current PHPStan baseline and runtime first. Add the extension pinned to a known version, run analysis, and diff new/removed errors. Adopt broadly only if it reduces false negatives for PSL usage without creating noise.
  • Compatibility: Pin PHPStan, Larastan, PSL, and PHP versions together. Verify the extension’s supported PHPStan extension API and test in the same CI matrix used by the Laravel app. Avoid mixing with unpinned static-analysis tooling.
  • Sequencing: Inventory PSL usage → verify source/license → add require-dev dependency → include extension config → run locally against baseline → review true positives → update CI gate → monitor for one iteration → expand to additional repos. Rollback is removing the include and dev dependency.

Operational Impact

  • Maintenance: Low runtime maintenance, but ongoing static-analysis config ownership. Treat it as a pinned dev tool and review Composer updates deliberately.
  • Support: Small community and unknown repository provenance create support risk. Assign an internal owner, monitor upstream activity, and be prepared to vendor or remove the extension if it becomes abandoned.
  • Scaling: PHPStan analysis time grows with codebase size; the extension may add overhead. Use Composer caching, PHPStan cache, parallel CI jobs, and memory tuning for larger Laravel monorepos.
  • Failure modes: Version conflicts, PHPStan crashes, false positives blocking merges, missing extension config, conflicts with Larastan rules, abandoned package, and supply-chain risk. Mitigate with version pinning, canary adoption, baseline review, and lockfiles.
  • Ramp-up: Low for teams already operating PHPStan/Larastan; moderate for teams unfamiliar with PSL’s type model. Document the include, update process, and rollback path. Given the low star count and unknown repository, treat adoption as tactical and conditional on confirmed PSL usage.
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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
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
cgv/localized-resource