From 48d206f3cda4d5a9d16e1322f34399113eb920e7 Mon Sep 17 00:00:00 2001 From: Peter Turek Date: Tue, 20 Jun 2023 16:00:59 +0200 Subject: [PATCH 1/2] only use GLOB_BRACE when available --- src/Command/Service/FilesPathService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/Service/FilesPathService.php b/src/Command/Service/FilesPathService.php index 6824632..4867473 100644 --- a/src/Command/Service/FilesPathService.php +++ b/src/Command/Service/FilesPathService.php @@ -35,7 +35,7 @@ public static function getPathToFiles(array $patterns): array */ private static function globRecursive(string $pattern): array { - $pathNames = glob($pattern, GLOB_BRACE); + $pathNames = glob($pattern, (defined('GLOB_BRACE') ? GLOB_BRACE : 0)); $files = array_filter($pathNames, 'is_file'); foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { From 4dc0c5a4a2075e57df7214d75e0e86952478a52b Mon Sep 17 00:00:00 2001 From: Peter Turek Date: Tue, 20 Jun 2023 16:01:07 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b768742..5012519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- [#76] Files path service: only use GLOB_BRACE when available ## [8.0.0] - 2023-02-26 ### Added @@ -241,6 +242,7 @@ patchesJson6902: [@DavidOstrozlik]: https://github.com/DavidOstrozlik [@PetrHeinz]: https://github.com/PetrHeinz +[#76]: https://github.com/sspooky13/yaml-standards/issues/76 [#72]: https://github.com/sspooky13/yaml-standards/issues/72 [#71]: https://github.com/sspooky13/yaml-standards/issues/71 [#73]: https://github.com/sspooky13/yaml-standards/issues/73