Composer API
Class

Composer\Package\Archiver\ComposerExcludeFilter

class ComposerExcludeFilter extends BaseExcludeFilter

An exclude filter which processes composer's own exclude rules

Methods

__construct(string $sourcePath, array $excludeRules)

bool filter(string $relativePath, bool $exclude)

Checks the given path against all exclude patterns in this filter

from BaseExcludeFilter

Details

at line 26
public __construct(string $sourcePath, array $excludeRules)

Parameters

string $sourcePath Directory containing sources to be filtered
array $excludeRules An array of exclude rules from composer.json

in BaseExcludeFilter at line 51
public bool filter(string $relativePath, bool $exclude)

Checks the given path against all exclude patterns in this filter

Negated patterns overwrite exclude decisions of previous filters.

Parameters

string $relativePath The file's path relative to the sourcePath
bool $exclude Whether a previous filter wants to exclude this file

Return Value

bool Whether the file should be excluded