Weave Code
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 Sealed Classes Laravel Package

jiripudil/phpstan-sealed-classes

PHPStan extension that adds sealed classes support for PHP: declare which classes/interfaces may extend or implement a type, and have PHPStan report violations. Helps enforce architecture boundaries and prevent unauthorized inheritance in large codebases.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enforces strict inheritance rules for sealed classes, reducing unintended subclassing and improving code maintainability.
  • Supports architectural decisions around immutable or tightly controlled class hierarchies (e.g., value objects, domain entities).
  • Integrates into CI/CD pipelines to catch violations early, reducing technical debt and debugging time.
  • Enables safer refactoring by ensuring sealed class contracts are respected across the codebase.

When to Consider This Package

  • ✅ Adopt when: Using PHP 8.1+ with sealed classes in your codebase; already using PHPStan for static analysis; needing to enforce strict inheritance boundaries in critical domain models.
  • ❌ Avoid when: Project uses PHP <8.1 or doesn’t implement sealed classes; using alternative static analysis tools like Psalm; team lacks experience with PHPStan.

How to Pitch It (Stakeholders)

  • Executives: "This tool proactively prevents bugs caused by unintended class inheritance, reducing production incidents and maintenance costs. By integrating with our existing PHPStan setup, it ensures code quality without slowing down development—directly impacting time-to-market for new features."
  • Engineering: "Zero-runtime-overhead extension for PHPStan that validates sealed class usage during development and CI. Simple to configure:
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.
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui