timeweb / phpstan-enum
PHPStan 的 Enum 类反射扩展
v3.1.1
2022-10-17 05:55 UTC
Requires
- php: ^7.1|^8.0
- myclabs/php-enum: ^1.2
- phpstan/phpstan: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.0|^9.0
This package is auto-updated.
Last update: 2024-09-17 10:06:37 UTC
README
此扩展为 MyCLabs\Enum\Enum
子类定义动态方法。
使用方法
要使用此扩展,请使用 Composer 进行安装
composer require --dev timeweb/phpstan-enum
如果您还安装了 phpstan/extension-installer,则一切准备就绪!
手动安装
如果您不想使用 phpstan/extension-installer
,请将 extension.neon 包含在您项目的 PHPStan 配置中
includes: - vendor/timeweb/phpstan-enum/extension.neon
为本地开发安装
使用 docker
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make docker-build
make install
make phpunit
不使用 docker(在本地安装实际的 php、composer 等)
git clone git@github.com:timeweb/phpstan-enum.git
cd phpstan-enum
make install
make phpunit