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 Laravel Laravel Package

calebdw/phpstan-laravel

A PHPStan extension for Laravel that teaches static analysis about Laravel’s magic, including facades, helpers, Eloquent models, and container bindings, reducing false positives and surfacing more accurate type errors in Laravel apps.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: calebdw/phpstan-laravel is a development-time PHPStan extension for Laravel applications and packages. It fits as a CI/quality-gate component rather than a runtime dependency, so architectural coupling is low. Its value is highest where Laravel’s dynamic container, facades, Eloquent, and package conventions cause PHPStan to miss or misread behavior.
  • Integration feasibility: Feasible for a Laravel team already using PHPStan, but requires version alignment across PHP, Laravel, PHPStan, and the extension. Package/application bootstrap behavior must be verified, especially for Laravel packages that do not have a full application context. A pilot in one repository is advisable before standardizing.
  • Technical risk: Primary risks are compatibility drift with PHPStan/Laravel releases, false positives that block CI, false negatives that create false confidence, and overlap/conflict with existing Laravel PHPStan tooling such as Larastan. Adoption signals are weak: 34 stars, incomplete repository metadata, and a release date that should be validated for provenance if it appears future-dated.
  • Key questions: Which PHPStan and Laravel versions are supported? Does it replace or complement Larastan? How are Laravel packages bootstrapped? What is CI runtime impact? How active is issue triage and release cadence? Are custom rules/config documented? Is there a credible fallback if maintenance stalls?

Integration Approach

  • Stack fit: Best suited to Laravel teams with an existing PHPStan pipeline and a desire to reduce Laravel-specific static-analysis blind spots. Confirm whether the package duplicates or conflicts with Larastan before adding it to the standard toolchain.
  • Migration path: Start with a non-blocking PHPStan job in one representative Laravel service or package. Add the extension as a dev dependency, generate a baseline for existing findings, compare results against the current PHPStan/Larastan configuration, then move to changed-code enforcement before considering full-repo blocking gates.
  • Compatibility: Pin PHPStan, Laravel, PHP, and extension versions in composer.json; test against the supported Laravel/PHP matrix. For packages, use Testbench or an equivalent harness. Validate CI behavior with missing .env, app keys, database access, and container bootstrapping.
  • Sequencing: Inventory current static-analysis tooling → run a proof of concept → measure findings and runtime → establish baseline and ownership → add non-blocking CI → enforce on changed code → expand incrementally. Define rollback by removing the extension include and retaining the existing PHPStan configuration.

Operational Impact

  • Maintenance: Low runtime maintenance because it is dev-only, but ongoing maintenance is required to track PHPStan and Laravel upgrades. The low star count and unknown repository increase bus-factor risk; assign an internal owner and document configuration and fallback.
  • Support: MIT license removes licensing friction but provides no vendor SLA. Expect community support only. Maintain an internal fork or pinned-version strategy if the project becomes a required quality gate.
  • Scaling: CI cost scales with repository count and analysis scope. Use Composer/PHPStan caching, parallel jobs, and changed-code gating first. Monitor analysis duration and memory as codebases and Laravel versions grow.
  • Failure modes: Incompatible PHPStan/Laravel releases can break CI; bootstrap failures can occur from missing environment configuration; false positives can block merges; extension overlap can produce conflicting results; abandoned maintenance can leave teams pinned to old tooling. Mitigate with pinned versions, baselines, non-blocking pilots, clear ownership, and a documented removal path.
  • Ramp-up: Low for engineers already familiar with PHPStan; moderate for teams needing to understand Laravel-specific static-analysis behavior and baseline management. Provide examples, CI documentation, and a clear policy for suppressing or fixing findings. Track adoption, CI duration, false-positive rate, baseline size, and escaped defects as success measures.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package