Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.39 KB

composer_require_checker.md

File metadata and controls

49 lines (33 loc) · 1.39 KB

Composer Require Checker

The Composer Require Checker task analyzes composer dependencies and verifies that no unknown symbols are used in the code. This will prevent you from using "soft" dependencies that are not defined within your composer.json. It lives under the composer_require_checker namespace and has following configurable parameters:

Composer

composer require --dev maglnet/composer-require-checker

Config

# grumphp.yml
grumphp:
    tasks:
        composer_require_checker:
            composer_file: 'composer.json'
            config_file: ~
            ignore_parse_errors: false
            triggered_by: ['composer.json', 'composer.lock', '*.php']

composer_file

Default: null

The composer.json of your code base that should be checked.

config_file

Default: null

Composer Require Checker is configured to whitelist some symbols by default. You can now override this configuration with your own and tell GrumPHP to use that configuration file instead.

ignore_parse_errors

Default: false

This will cause Composer Require Checker to ignore errors when files cannot be parsed, otherwise errors will be thrown.

This option is only available in version 0.2.0 of maglnet/composer-require-checker and above.

triggered_by

Default: ['composer.json', 'composer.lock', '*.php']

This is a list of file names that should trigger this task.