感染 / 扩展安装程序
Infection 扩展安装程序
0.1.2
2021-10-20 22:08 UTC
Requires
- composer-plugin-api: ^1.1 || ^2.0
Requires (Dev)
- composer/composer: ^1.9 || ^2.0
- friendsofphp/php-cs-fixer: ^2.18, <2.19
- infection/infection: ^0.15.2
- php-coveralls/php-coveralls: ^2.4
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12.10
- phpstan/phpstan-phpunit: ^0.12.6
- phpstan/phpstan-strict-rules: ^0.12.2
- phpstan/phpstan-webmozart-assert: ^0.12.2
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2024-08-29 22:52:23 UTC
README
Infection - 扩展安装程序
Composer 插件,用于自动注册 Infection 扩展。
如何安装扩展
扩展安装程序与 Infection 核心捆绑在一起。您只需安装一个 composer 包即可注册自定义扩展。
扩展将自动注册。
Infection 扩展安装程序监听 post-install-cmd
和 post-update-cmd
事件,一旦找到 Infection 扩展,它就会自动将其注册到 Infection 中。
composer require --dev infection/codeception-adapter Using version 1.0.0 for infection/codeception-adapter Package operations: 1 installs, 0 updates, 0 removals - Installing infection/codeception-adapter (1.0.0): Downloading 100% infection/extension-installer: Extensions installed > infection/codeception-adapter: installed
如何为 Infection 编写扩展
Infection 扩展是基于 Composer 的包。基本上,它是一个符合以下要求的 Composer 包
- 其类型字段设置为
infection-extension
- 它的
composer.json
中有extra.infection.class
子键,它引用了一个将在 Infection 运行时调用的类。
示例
{ "name": "infection/codeception-adapter", "type": "infection-extension", "extra": { "infection": { "class": "Infection\\TestFramework\\Codeception\\CodeceptionAdapterFactory" } } }
支持的扩展类型
目前,Infection 仅支持测试框架扩展(《示例》)。
可用扩展
所有 Infection 扩展都可以在 Packagist 上找到。
Infection - 演化测试框架
请在此处阅读文档:infection.github.io
Twitter: @infection_php