Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLOB_BRACE breaks Sulu on Alpine Linux #4513

Closed
tvwijgerden opened this issue Apr 10, 2019 · 3 comments · Fixed by #4516

Comments

@tvwijgerden
Copy link
Contributor

@tvwijgerden tvwijgerden commented Apr 10, 2019

Q A
Bug? yes
New Feature? no
Sulu Version 2.0.0-alpha5
Browser Version n.a.

Actual Behavior

Sulu crashes on systems which don't support GLOB_BRACE.

Expected Behavior

Sulu works on systems that don't support GLOB_BRACE.

Steps to Reproduce

Install Sulu 2.0 on Alpine Linux.

Possible Solutions

In the SuluKernel use the Glob polyfill provided by the zendframework/zend-stdlib package.

@alexander-schranz

This comment has been minimized.

Copy link
Member

@alexander-schranz alexander-schranz commented Apr 11, 2019

@tvwijgerden Thank you for your issue.

The problem seems to be here:

$configFiles = glob($glob . $configExtensions, GLOB_BRACE);
$excludedConfigFiles = glob($glob . $reversedConfigExtensions, GLOB_BRACE);

If GLOB_BRACE is not available we should fallback to the symfony function e.g.:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Config/Resource/GlobResource.php#L150-L151

you want to give it a try and create a Pull Request?

@tvwijgerden

This comment has been minimized.

Copy link
Contributor Author

@tvwijgerden tvwijgerden commented Apr 11, 2019

Yes, I'll create a Pull Request

@alexander-schranz

This comment has been minimized.

Copy link
Member

@alexander-schranz alexander-schranz commented Apr 11, 2019

@tvwijgerden awesome 👍
Maybe we can directly use the GlobResource class of symfony so we don't need to handle the fallback ourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.