Skip to content

ComposerDependencyAnalyserConfig

github-actions[bot] edited this page May 2, 2026 · 1 revision

Provides the default Composer Dependency Analyser configuration.

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] ); } );


  • Full name: \FastForward\DevTools\Config\ComposerDependencyAnalyserConfig
  • This class is marked as final and can't be subclassed
  • This class is a Final class

See Also:

Constants

Constant Visibility Type Value
ENV_SHOW_SHADOW_DEPENDENCIES public 'FAST_FORWARD_DEV_TOOLS_SHOW_SHADOW_DEPENDENCIES'
DEFAULT_PACKAGED_UNUSED_DEPENDENCIES public array<int,string> ['ergebnis/phpunit-agent-reporter', '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']
DEFAULT_PACKAGED_PROD_ONLY_IN_DEV_DEPENDENCIES public array<int,string> ['phpspec/prophecy', 'phpspec/prophecy-phpunit', 'symfony/var-exporter']

Methods

configure

Creates the default Composer Dependency Analyser configuration.

public static configure(callable|null $customize = null): \ShipMonk\ComposerDependencyAnalyser\Config\Configuration
  • This method is static. Parameters:
Parameter Type Description
$customize callable|null optional callback to customize the configuration

Return Value:

the configured analyser configuration


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.

public static applyIgnoresShadowDependencies(\ShipMonk\ComposerDependencyAnalyser\Config\Configuration $configuration): \ShipMonk\ComposerDependencyAnalyser\Config\Configuration
  • This method is static. Parameters:
Parameter Type Description
$configuration \ShipMonk\ComposerDependencyAnalyser\Config\Configuration the analyser configuration to customize

Return Value:

the modified configuration with shadow dependencies ignored


shouldShowShadowDependencies

Determines whether shadow dependency reports SHOULD remain visible.

public static shouldShowShadowDependencies(): bool
  • This method is static.

applyPackagedRepositoryIgnores

Applies the ignores required only by the packaged DevTools repository.

public static applyPackagedRepositoryIgnores(\ShipMonk\ComposerDependencyAnalyser\Config\Configuration $configuration): \ShipMonk\ComposerDependencyAnalyser\Config\Configuration
  • This method is static. Parameters:
Parameter Type Description
$configuration \ShipMonk\ComposerDependencyAnalyser\Config\Configuration the analyser configuration to customize

Return Value:

the modified configuration with packaged repository ignores applied


Clone this wiki locally