timeweb / phpstan-enum
Enum class reflection extension for PHPStan
Installs: 2 625 033
Dependents: 19
Suggesters: 0
Security: 0
Stars: 43
Watchers: 7
Forks: 7
Open Issues: 1
Type:phpstan-extension
Requires
- php: ^7.4|^8.0
- myclabs/php-enum: ^1.2
- phpstan/phpstan: ^2.0
Requires (Dev)
- phpunit/phpunit: ^7.0|^9.0
README
This extension defines dynamic methods for MyCLabs\Enum\Enum
subclasses.
Usage
To use this extension, require it with Composer
composer require --dev timeweb/phpstan-enum
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use phpstan/extension-installer
, include extension.neon in your project's PHPStan config:
includes: - vendor/timeweb/phpstan-enum/extension.neon
Install for Local Development
With docker
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make docker-build
make install
make phpunit
Without docker (localy installed actual version of php, composer, etc)
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make install
make phpunit