johnatas-x / grumphp-drupal-check
Execute drupal check in a grumphp task.
Installs: 3 938
Dependents: 3
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 8
Open Issues: 0
Requires
- mglaman/drupal-check: ^1.5.0
- phpro/grumphp: ^2.9.0
This package is auto-updated.
Last update: 2024-11-11 13:43:41 UTC
README
⚠️ The version 2 of this project is made for GrumPHP 2.0. Check release 1.1.0 for GrumPHP 1.15 ⚠️
Description
This repository adds a task for GrumPHP that launchs drupal-check. During a commit check Drupal code for deprecations and discover bugs via static analysis. If a deprecated code is detected, it won't pass.
Installation
Install it using composer:
composer require --dev johnatas-x/grumphp-drupal-check
Usage
- Add the extension in your grumphp.yml file:
extensions: - GrumphpDrupalCheck\ExtensionLoader
- Add drupal check to the tasks:
tasks:
drupal_check:
drupal_root: ~
memory_limit: ~
deprecations: true
analysis: true
style: true
php8: true
exclude_dir: []
Optionally, you can define multiple DrupalCheck arguments:
- drupal_root (string): Configure the path to the Drupal root. This fallback option can be used if drupal-check could not identify Drupal root from the provided path(s). This is useful when testing a module as opposed to a Drupal installation.
- memory_limit (string): Configure memory limit for the process.
- deprecations (boolean): Check code for deprecations. By default it is true.
- analysis (boolean): Check code analysis.
- style (boolean): Check code style
- php8 (boolean): Set PHPStan phpVersion for 8.1 (Drupal 10 requirement).
- exclude_dir (array): Exclude directories. Wildcards work.