Skip to content

Commit

Permalink
Check individual files against exclude_from_copy/file_patterns Fix #67
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Dec 10, 2023
1 parent af1ac75 commit 6ab4064
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/FileEnumerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ public function compileFileList(): void
$sourceAbsoluteFilepath = $packagePath . $namespace_relative_path;
$outputRelativeFilepath = $dependency->getRelativePath() . DIRECTORY_SEPARATOR . $namespace_relative_path;

$file = array(
foreach ($this->excludeFilePatterns as $excludePattern) {
if (1 === preg_match($excludePattern, $outputRelativeFilepath)) {
continue 2;
}
}

$file = array(
'dependency' => $dependency,
'sourceAbsoluteFilepath' => $sourceAbsoluteFilepath,
'targetRelativeFilepath' => $outputRelativeFilepath,
Expand Down

0 comments on commit 6ab4064

Please sign in to comment.