Skip to content

Commit

Permalink
only use GLOB_BRACE when available (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
sspooky13 committed Jun 20, 2023
2 parents d0b9828 + 4dc0c5a commit 8ae3556
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [Unreleased]
- [#76] Files path service: only use GLOB_BRACE when available

## [8.0.0] - 2023-02-26
### Added
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Service/FilesPathService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8ae3556

Please sign in to comment.