ComposerDependencyAnalyserConfig

Class
Final: Yes

Provides the default Composer Dependency Analyser configuration.

Description

Consumers can use this as a starting point and extend it:

return \FastForward\DevTools\Config\ComposerDependencyAnalyserConfig::configure( static function (\ShipMonk\ComposerDependencyAnalyser\Config\Configuration $configuration): void { $configuration->ignoreErrorsOnPackage( 'vendor/package', [\ShipMonk\ComposerDependencyAnalyser\Config\ErrorType::UNUSED_DEPENDENCY] ); } );

Tags

Table of Contents

Constants

DEFAULT_PACKAGED_PROD_ONLY_IN_DEV_DEPENDENCIES

Production dependencies intentionally kept in require for the packaged toolchain.

 = ['phpspec/prophecy', 'phpspec/prophecy-phpunit', 'symfony/var-exporter']
DEFAULT_PACKAGED_UNUSED_DEPENDENCIES

Dependencies that are only required by the packaged DevTools distribution itself.

 = ['ergebnis/composer-normalize', 'fakerphp/faker', 'fast-forward/phpdoc-bootstrap-template', 'php-parallel-lint/php-parallel-lint', 'phpdocumentor/shim', 'phpmetrics/phpmetrics', 'phpro/grumphp-shim', 'pyrech/composer-changelogs', 'rector/jack', 'saggre/phpdocumentor-markdown', 'symfony/var-dumper']

Methods

applyPackagedRepositoryIgnores()

Applies the ignores required only by the packaged DevTools repository.

 : void
configure()

Creates the default Composer Dependency Analyser configuration.

 : Configuration
Constants

Constants

DEFAULT_PACKAGED_PROD_ONLY_IN_DEV_DEPENDENCIES

Public

Production dependencies intentionally kept in require for the packaged toolchain.

public array<int, string> DEFAULT_PACKAGED_PROD_ONLY_IN_DEV_DEPENDENCIES = ['phpspec/prophecy', 'phpspec/prophecy-phpunit', 'symfony/var-exporter']

Description

These dependencies are only exercised in test and development paths inside this repository, but they MUST remain available to the packaged DevTools runtime for consumer projects that choose to use those capabilities.

DEFAULT_PACKAGED_UNUSED_DEPENDENCIES

Public

Dependencies that are only required by the packaged DevTools distribution itself.

public array<int, string> DEFAULT_PACKAGED_UNUSED_DEPENDENCIES = ['ergebnis/composer-normalize', 'fakerphp/faker', 'fast-forward/phpdoc-bootstrap-template', 'php-parallel-lint/php-parallel-lint', 'phpdocumentor/shim', 'phpmetrics/phpmetrics', 'phpro/grumphp-shim', 'pyrech/composer-changelogs', 'rector/jack', 'saggre/phpdocumentor-markdown', 'symfony/var-dumper']

Description

These packages MUST only be ignored when the analyser runs against the DevTools repository, because consumer repositories do not inherit them as direct requirements automatically.

Methods

applyPackagedRepositoryIgnores()

Public Static

Applies the ignores required only by the packaged DevTools repository.

public static applyPackagedRepositoryIgnores(Configuration  $configuration) : void
Parameters
$configuration : Configuration

Description

the analyser configuration to customize

configure()

Public Static

Creates the default Composer Dependency Analyser configuration.

public static configure([ callable|null  $customize = null]) : Configuration
Parameters
$customize : callable|null = null

Description

optional callback to customize the configuration

Return values
Configuration

Description

the configured analyser configuration