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']
 = 'FAST_FORWARD_DEV_TOOLS_SHOW_SHADOW_DEPENDENCIES'

Methods

applyIgnoresShadowDependencies()

The default configuration ignores shadow dependencies because Fast Forward packages MAY intentionally require dependency groups. For example, ecosystem or meta packages can require related PSR or framework packages so consumers do not need to install every package one by one.

 : Configuration
applyPackagedRepositoryIgnores()

Applies the ignores required only by the packaged DevTools repository.

 : Configuration
configure()

Creates the default Composer Dependency Analyser configuration.

 : Configuration
shouldShowShadowDependencies()

Determines whether shadow dependency reports SHOULD remain visible.

 : bool
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

applyIgnoresShadowDependencies()

Public Static

The default configuration ignores shadow dependencies because Fast Forward packages MAY intentionally require dependency groups. For example, ecosystem or meta packages can require related PSR or framework packages so consumers do not need to install every package one by one.

public static applyIgnoresShadowDependencies(Configuration  $configuration) : Configuration
Parameters
$configuration : Configuration

Description

the analyser configuration to customize

Return values
Configuration

Description

the modified configuration with shadow dependencies ignored

applyPackagedRepositoryIgnores()

Public Static

Applies the ignores required only by the packaged DevTools repository.

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

Description

the analyser configuration to customize

Return values
Configuration

Description

the modified configuration with packaged repository ignores applied

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

shouldShowShadowDependencies()

Public Static

Determines whether shadow dependency reports SHOULD remain visible.

public static shouldShowShadowDependencies() : bool
Return values
bool