Skip to content

Commit aebcb06

Browse files
committed
Allow wildcard in patches search folder path
1 parent c8e2360 commit aebcb06

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Patch/SourceLoaders/PatchesSearch.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ public function load(\Composer\Package\PackageInterface $package, $source)
102102
$basePath = $this->getInstallPath($package);
103103
$results = array();
104104

105-
foreach ($source as $item) {
106-
$paths = $this->fileSystemUtils->collectFilePathsRecursively(
107-
$basePath . DIRECTORY_SEPARATOR . $item,
108-
sprintf('/%s/i', PluginConfig::PATCH_FILE_REGEX_MATCHER)
109-
);
105+
foreach ($source as $sourceGlob) {
106+
foreach (glob($sourceGlob) as $item) {
107+
$paths = $this->fileSystemUtils->collectFilePathsRecursively(
108+
$basePath . DIRECTORY_SEPARATOR . $item,
109+
sprintf('/%s/i', PluginConfig::PATCH_FILE_REGEX_MATCHER)
110+
);
110111

111-
$results[] = $this->createPatchDefinitions($basePath, $paths);
112+
$results[] = $this->createPatchDefinitions($basePath, $paths);
113+
}
112114
}
113115

114116
return $results;

0 commit comments

Comments
 (0)