temirkhan / phpstan-internal-rules
PHPStan rules to prevent prohibited usage of classes marked as @internal
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/temirkhan/phpstan-internal-rules
Requires (Dev)
- php: ~7.4.0|^8.0
- phpstan/phpstan: ^0.12.99
- phpunit/phpunit: ^9.5
README
PHPStan rules to handle @internal tag, preventing prohibited usage of such classes
- Internal class instantiation
- Internal class or interface used as property type
- Inheritance from an internal class or interface
- Internal class method call(static, call_user_func and direct call)
- Internal trait usage
Usage
This is likely pretty much outdated since it was just a proof of concept.
You can give it a try by installing it via composer
composer require --dev temirkhan/phpstan-internal-rules
then add extension to your phpstan.neon.dist
includes: - vendor/temirkhan/phpstan-internal-rule/extension.neon