You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' (this will throw an Error in a future version of PHP) in /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php on line 38
Fatal error: Uncaught TypeError: glob() expects parameter 2 to be int, string given in /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php:38
Full log
Warning: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' (this will throw an Error in a future version of PHP) in /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php on line 38
Fatal error: Uncaught TypeError: glob() expects parameter 2 to be int, string given in /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php:38
Stack trace:
#0 /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php(38): glob('./*{.yml,.yaml,...', 'GLOB_BRACE')
#1 /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php(20): YamlStandards\Command\Service\FilesPathService::globRecursive('./*{.yml,.yaml,...')
#2 /srv/sylius/vendor/sspooky13/yaml-standards/src/Model/Config/YamlStandardConfigLoader.php(43): YamlStandards\Command\Service\FilesPathService::getPathToFiles(Array)
#3 /srv/sylius/vendor/sspooky13/yaml-standards/src/Model/Config/YamlStandardConfigLoader.php(31): YamlStandards\Model\Config\YamlStandardConfigLoader->createConfigData(Array)
#4 /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/YamlCommand.php(51): YamlStandards\Model\Config\YamlStandardConfigLoader->loadFromYaml('./yaml-standard...')
#5 /srv/sylius/vendor/symfo in /srv/sylius/vendor/sspooky13/yaml-standards/src/Command/Service/FilesPathService.php on line 38
How to reproduce
call yaml-standard bin from docker with alpine linux
Just patched my local version with it and seems to work correctly.
vendor/bin/yaml-standards is being called without errors now
Number of found files matches number of files in directory with find path/to/dir -mindepth 1 -type f -name "*.yml" -printf x | wc -c for yml/yaml file extensions.
Thank you for super fast fix :)
EDIT: P.S. Yes, it's okay for me and I've no use for GLOB_BRACE const directly.
You are welcome 😊 I released new version where is this issue fixed, so you can change version in composer.json to don't have to change your localhost version
Which version(s) is affected: 8.0.0.
Description
Full log
How to reproduce
call yaml-standard bin from docker with alpine linux
Possible Solution
Handle possiblity of
GLOB_BRACE
missing.https://www.php.net/manual/en/function.glob.php
Additional information
zendframework/zend-stdlib#58
zend-stdlib has fallback glob for this exact issue https://github.com/zendframework/zend-stdlib/blob/6d965efcce81ee60e2b425792f1cd3f27aed82d9/src/Glob.php#L39-L46
The text was updated successfully, but these errors were encountered: