php / doc-base

Tools for the PHP documentation
Other
343 stars 85 forks source link

undefined constant GLOB_BRACE on Alpine Linux #39

Closed deleugpn closed 4 months ago

deleugpn commented 3 years ago

While following the guide on http://doc.php.net/tutorial/local-setup.php when I got to the step of running php doc-base/configure.php I got a warning

Iterating over extension specific version files... PHP Warning:  Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' (this will throw an Error in a future version of PHP) in /app/doc-base/configure.php on line 649

While looking into it, Alpine Linux doesn't seem to support GLOB_BRACE. I decided to run a container with Amazon Linux 2 (bref.sh images) and the warning does not show up there. I did the following comparison

Distribution Command
Amazon Linux 2 var_dump(glob($globdir));
Amazon Linux 2 var_dump(glob($globdir), GLOB_BRACE);
Alpine Linux var_dump(glob($globdir));

All 3 generated the exact same output. I'm not sure if I'm missing something, but simply dropping GLOB_BRACE seems to solve the support compatibility with Alpine without sacrificing anything?

emover121 commented 8 months ago

updat docoments