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
Applies the ignores required only by the packaged DevTools repository.
Creates the default Composer Dependency Analyser configuration.
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.
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
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