wwwision/types-phpstan
Custom PHPStan rules for wwwision/types
Maintainers
Package info
github.com/bwaidelich/types-phpstan
Type:phpstan-extension
pkg:composer/wwwision/types-phpstan
1.1.0
2026-06-26 11:58 UTC
Requires
- php: >=8.3
- phpstan/extension-installer: ^1
- phpstan/phpstan: ^2
Requires (Dev)
- phpstan/phpstan-phpunit: ^2
- phpunit/phpunit: ^12
- roave/security-advisories: dev-latest
- wwwision/types: ^1.12
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 347cc3cd358792e7bce876b64b0ccd7ad5fcf2c1
- bwaidelich <b.waidelich.woop@wwwision.de>
This package is auto-updated.
Last update: 2026-06-26 11:59:24 UTC
README
Custom PHPStan rules and extensions for the wwwision/types package
What's included
- Rules that enforce the best practices for
#[TypeBased]classes (must befinal,readonly, have a private constructor and never be constructed directly). - A reflection extension for dynamic schemas: instances of
DynamicRecordare read via__get, so PHPStan would normally report$record->somePropertyas access to an undefined property. The extension teaches PHPStan that any property of aDynamicRecordis a readable (immutable)mixedvalue, so object-accessor syntax type-checks. (A dynamic record's shape is only known at runtime, so per-property types cannot be inferred.)
Installation
To use this extension, require it in Composer:
composer require --dev wwwision/types-phpstan
If you also install phpstan/extension-installer then you're all set!
