youwe / testing-suite
包含Youwe的默认PHP测试包。
2.19.0
2024-08-13 14:42 UTC
Requires
- php: ^7.2 || ^8.0
- composer-plugin-api: ^1.1 || ^2.0
- enlightn/security-checker: ^1.5 || ^2.0
- kint-php/kint: @stable
- php-parallel-lint/php-parallel-lint: ^1.2
- phpro/grumphp-shim: ^1.13
- phpstan/phpstan: @stable
- phpunit/phpunit: @stable
- youwe/coding-standard: ^3.5.0
- youwe/coding-standard-phpstorm: ^2.3.0
- youwe/composer-dependency-installer: ^1.4.0
- youwe/composer-file-installer: ^1.2.0
Requires (Dev)
- composer/composer: @stable
- mikey179/vfsstream: @stable
Replaces
- dev-master
- 2.19.0
- 2.18.1
- 2.18.0
- 2.17.1
- 2.17.0
- 2.16.2
- 2.16.1
- 2.16.0
- 2.15.0
- 2.15.0-RC1
- 2.14.0
- 2.14.0-RC1
- 2.13.1
- 2.13.0
- 2.13-RC1
- 2.12.0
- 2.11.1
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.25.2
- 1.25.2-beta1
- 1.25.1
- 1.25.0
- 1.24.0
- 1.23.1
- 1.23.0
- 1.22.0
- 1.21.5
- 1.21.4
- 1.21.3
- 1.21.2
- 1.21.1
- 1.21.0
- 1.20.2
- 1.20.1
- 1.20.0
- 1.19.1
- 1.19.0
- 1.18.0
- 1.17.1
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.12.0
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-feature/OTDEVOPS-15-Add-snapshot-functionality
- dev-feature/OTDEVOPS-18-coding-standards
- dev-feature/phpro-grumphp-shim
- dev-feature/fix-pathing
- dev-feature/OTPBBBBBZP-117
- dev-feature/dev-stability
- dev-support/1.x
- dev-feature/APD-1508
- dev-feature/mysql-8-php-74
- dev-feature/composer-2-compatibility
- dev-feature/support-symfony-4x
- dev-feature/support-composer-v2
- dev-feature/allow-phpunit-9x
- dev-feature/enable-symfony-5x
This package is auto-updated.
Last update: 2024-09-13 14:48:52 UTC
README
Youwe测试套件
简介
Youwe测试套件是一个用于对composer包/项目进行静态代码分析的全能解决方案。它可以在本地和CI/CD中进行。为此,测试套件利用了GrumPHP,并为每种项目类型预定义了默认配置。
特性
支持的项目类型
包含的分析工具
- Git黑名单
- Composer文件验证
- JSON Lint
- YamlLint
- PHPCS(编码标准)
- PHPMD(错误检测器)
- PHPStan(在生产前发现错误)
- PHPUnit(执行单元测试)
- PHP Lint
- ESLint(在JavaScript代码中查找和修复问题)
- Enlighten安全检测器
安装
测试套件应作为composer dev
依赖项安装。在任何项目中,只需运行以下命令即可安装此包
composer require youwe/testing-suite --dev
如果检测到项目类型,则应用标准(否则将打开向导)
用法
本地
可以通过GrumPHP命令手动运行测试套件。
vendor/bin/grumphp run
或对于DDev项目
ddev exec vendor/bin/grumphp run
Git提交钩子
测试套件将在每次git提交时通过git提交钩子自动运行。
此git提交钩子将自动检测DDev项目,并在需要时在DDev容器中运行GrumPHP。此行为可以通过环境变量禁用
- 在单个基础上
YOUWE_BYPASS_DDEV=1 git commit
- 在项目基础上通过
grumphp.yml
配置文件
imports:
- resource: 'vendor/youwe/testing-suite/config/your-project-type/grumphp.yml'
grumphp:
git_hook_variables:
# Disable DDev detection by restoring to default `exec`
# See https://github.com/phpro/grumphp/blob/v2.x/doc/parameters.md for more options
EXEC_GRUMPHP_COMMAND: exec
更改您的grumphp.yml
后,运行vendor/bin/grumphp git:init
以更新git提交钩子。
CI/CD集成示例
变更日志
查看变更日志文件以获取所有更改。