ExportIgnoreFilter

Class
Final: Yes

Filters export-ignore candidates using normalized path comparisons.

Description

This filter SHALL compare configured keep-in-export paths against canonical candidates while ignoring leading and trailing slash differences. It MUST preserve the original candidate ordering in the filtered result.

Table of Contents

Interfaces

ExportIgnoreFilterInterface

Filters canonical export-ignore candidates against consumer keep rules.

Methods

filter()

Filters export-ignore candidates using the configured keep-in-export paths.

 : array<int, string>
normalizePath()

Normalizes a configured path for stable matching.

 : string
Methods

filter()

Public

Filters export-ignore candidates using the configured keep-in-export paths.

public filter( array<int, string>  $candidates, array<int, string>  $keepInExportPaths) : array<int, string>
Parameters
$candidates : array<int, string>

Description

the canonical candidate paths

$keepInExportPaths : array<int, string>

Description

the paths that MUST remain exportable

Return values
array<int, string>

Description

the filtered export-ignore candidates

normalizePath()

Private

Normalizes a configured path for stable matching.

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

Description

the raw path from candidates or Composer extra config

Return values
string

Description

the normalized path used for comparisons