youwe / testing-suite
Contains Youwe's default testing packages for php.
Package info
github.com/YouweGit/testing-suite
Type:composer-plugin
pkg:composer/youwe/testing-suite
Requires
- php: ^8.1
- composer-plugin-api: ^2.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- enlightn/security-checker: ^1.5 || ^2.0
- kint-php/kint: @stable
- php-cs-fixer/shim: @stable
- php-parallel-lint/php-parallel-lint: ^1.4
- phpmd/phpmd: ^2.15 || 3.x-dev
- phpro/grumphp-shim: ^2.15
- phpstan/phpstan: @stable
- squizlabs/php_codesniffer: ^3.12.0
- youwe/composer-dependency-installer: ^2.0
- youwe/composer-file-installer: ^2.0.0
Requires (Dev)
- composer/composer: @stable
- mikey179/vfsstream: @stable
- phpunit/phpunit: @stable
Suggests
- phpunit/phpunit: >= 9.6
- youwe/coding-standard-phpstorm: ^2.3.0
Conflicts
- phpro/grumphp-shim: >= 2.18.0
Replaces
This package is auto-updated.
Last update: 2026-05-31 00:19:03 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
The Youwe Testing Suites offers pre-configured standards for the following project types.
| Testing Suite Project Type | Detected based on Composer Project Type |
|---|---|
drupal |
drupal-bundle, drupal-project |
magento2 |
magento-module, magento-project, magento2-module, magento2-project |
pimcore |
pimcore-bundle, pimcore-project |
default |
Any other |
This project type is either detected from composer.json via the section
{
"extra": {
"youwe-testing-suite": { "type": "magento2" }
}
}
or if no explicit setting was found for the Testing Suite, via
{
"type": "magento2-module"
}
Included analysis tools
- Git blacklist
- Git commit message
- 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
First, configure your project type (see the above list of supported types) via
composer config type magento2-project
or
composer config extra.youwe-testing-suite.type magento2
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.ymlconfiguration 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.