youwe / testing-suite
Contains Youwe's default testing packages for php.
Installs: 107 323
Dependents: 13
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 10
Open Issues: 2
Type:composer-plugin
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-11-13 15:14:19 UTC
README
Youwe Testing Suite
Introduction
Youwe Testing Suite is an all-in-one solution for doing static code analysis on composer packages/projects. It does so both locally and in CI/CD. For this, Testing-suite leverages GrumPHP with predefined default configurations per project type.
Features
Supported project types
Included analysis tools
- Git blacklist
- Composer file validation
- JSON Lint
- YamlLint
- PHPCS (Coding Standards)
- PHPMD (Mess Detector)
- PHPStan (Find bugs before they reach production)
- PHPUnit (Execute Unit tests)
- PHP Lint
- ESLint (Find and fix problems in your JavaScript code)
- Enlighten Security Checker
Installation
Testing suite is supposed to be installed as a composer dev
dependency.
Within any project just run the command below to install the package:
composer require youwe/testing-suite --dev
If a project-type is detected, standards will be applied (otherwise a wizard will be opened)
Usage
Locally
The testing suite can be run manually through the GrumPHP command.
vendor/bin/grumphp run
or for DDev projects
ddev exec vendor/bin/grumphp run
Git commit hook
The testing suite is automatically run at each git commit using a git commit hook.
This git commit hook will automatically detect DDev projects and will run GrumPHP within the DDev container if needed. This behaviour can be disabled:
- on individual basis via an environment variable:
YOUWE_BYPASS_DDEV=1 git commit
- on project basis via the
grumphp.yml
configuration file:
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
After changing your grumphp.yml
, run vendor/bin/grumphp git:init
to update the git commit hook.
CI/CD Integration examples
Changelog
See the Changelog file for all changes.