ManagedConfigPathSynchronizer

Class
Final: Yes

Synchronizes deprecated DevTools-managed GrumPHP composer metadata without leaking package paths into consumers.

Table of Contents

Constants

 = 'vendor/fast-forward/dev-tools/grumphp.yml'

Methods

isManagedConfigPath()

Reports whether a config-default-path value is managed by DevTools.

 : bool
synchronize()

Removes deprecated DevTools-managed GrumPHP config-default-path entries while preserving consumer-owned values.

 : array<string, mixed>
normalize()

Normalizes a path for stable comparisons across platforms.

 : string
Constants

Constants

MANAGED_CONFIG_SUFFIX

Private
private string MANAGED_CONFIG_SUFFIX = 'vendor/fast-forward/dev-tools/grumphp.yml'

Description

relative packaged config suffix managed by DevTools installs

Methods

isManagedConfigPath()

Public

Reports whether a config-default-path value is managed by DevTools.

public isManagedConfigPath( string  $configDefaultPath, string  $workingDirectory, string  $managedConfigPath) : bool
Parameters
$configDefaultPath : string

Description

the stored composer extra path value

$workingDirectory : string

Description

the consumer project directory

$managedConfigPath : string

Description

the active packaged GrumPHP config path

Return values
bool

synchronize()

Public

Removes deprecated DevTools-managed GrumPHP config-default-path entries while preserving consumer-owned values.

public synchronize( array<string, mixed>  $extra, string  $workingDirectory, string  $managedConfigPath) : array<string, mixed>
Parameters
$extra : array<string, mixed>

Description

the composer.json extra payload

$workingDirectory : string

Description

the consumer project directory

$managedConfigPath : string

Description

the active packaged GrumPHP config path

Return values
array<string, mixed>

Description

the synchronized composer extra payload

normalize()

Private

Normalizes a path for stable comparisons across platforms.

private normalize( string  $path) : string
Parameters
$path : string

Description

the path to normalize

Return values
string