swissspidy/phpstan-no-private
PHPStan extension that reports deprecation warnings when code uses “pseudo-private” elements marked with @access private. Helps prevent relying on internal classes, methods, functions, or properties. Easy install via Composer with optional extension-installer support.
This PHPStan extension emits deprecation warnings on code which uses properties/functions/methods/classes which are annotated as @access private.
To use this extension, require it in Composer:
composer require --dev swissspidy/phpstan-no-private
If you also install phpstan/extension-installer then you're all set!
If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:
includes:
- vendor/swissspidy/phpstan-no-private/rules.neon
This project is a fork of the excellent phpstan/phpstan-deprecation-rules, which provides rules that detect usage of deprecated classes, methods, properties, constants and traits.
How can I help you explore Laravel packages today?