ComposerDependencyAnalyserConfig
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] ); } );
Constants
Production dependencies intentionally kept in require for the packaged toolchain.
Dependencies that are only required by the packaged DevTools distribution itself.
Methods
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.
Applies the ignores required only by the packaged DevTools repository.
Creates the default Composer Dependency Analyser configuration.
Determines whether shadow dependency reports SHOULD remain visible.
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.
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.
public
mixed
ENV_SHOW_SHADOW_DEPENDENCIES
=
'FAST_FORWARD_DEV_TOOLS_SHOW_SHADOW_DEPENDENCIES'
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
Description
the modified configuration with shadow dependencies ignored
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
Description
the modified configuration with packaged repository ignores applied
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
Description
the configured analyser configuration
Determines whether shadow dependency reports SHOULD remain visible.
public
static
shouldShowShadowDependencies() : bool