zendframework/zend-stdlib

GLOB_BRACE support on Alpine and others musl-based distros

Closed this issue · 6 comments

Seems that Alpine doesn't support GLOB_BRACE since it is using musl libc instead of GNU libc.

This module is affecting some installations since it depends on it. Is there a chance to work around it?

Is there a chance to work around it?

Seems like calling glob() multiple times and then doing an array_merge() is the solution for those systems. We cannot support it ourselves though, as we'd have to rewrite a glob implementation in userland then :(

@Ocramius thanks for your super fast response!!

Well, seems you already have a fallback, but in fact it also seems the system isn't complaining about the implementation but instead about the non declarated use.

  [Exception]
  Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /magento/vendor/zendframework/zend-stdlib/src/Glob.php on line 64

Shouldn't this have a defined('GLOB_BRACE') check?

@cusspvz that should be quite easy to fix, yes (@DASPRiD built some workarounds before 2.0 to support old UNIX systems that didn't have GLOB_BRACE). Can you attempt a fix?

Also, remember to always link absolute code reference: using just master causes links to be broken on long term (due to code moving around)

Also, remember to always link absolute code reference: using just master causes links to be broken on long term (due to code moving around)

@Ocramius can you please explain what you meant here? Didn't understood, sorry.

@cusspvz look at the links in your comment above: I modified them to point at a specific SHA1 of the repo

Ohh, I got it now! Thanks!!