Skip to content

Fix for support on Alpine and others musl-based distros#44

Merged
reisraff merged 2 commits intoreisraff:masterfrom
igk1972:igk1972-fix-suport-musl
Jul 3, 2018
Merged

Fix for support on Alpine and others musl-based distros#44
reisraff merged 2 commits intoreisraff:masterfrom
igk1972:igk1972-fix-suport-musl

Conversation

@igk1972
Copy link
Copy Markdown
Contributor

@igk1972 igk1972 commented Jul 3, 2018

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

I was trying to compile static assets on an Alpine Linux Docker container (popular case). I was unable to, because there is a error around usage of the GLOB_BRACE constant, which may or may not be defined depending on the environment, and isn't defined/worked in Alpine Linux.

Using an Alpine Linux PHP Docker container, for running Phulp:
PHP 7.1 (Alpine Linux 3.7)

The following:

[Exception]
Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /app/php_packages/reisraff/phulp/bin/phulp.php on line 145

Alpine doesn't support GLOB_BRACE since it is using musl libc instead of GNU libc.
@reisraff
Copy link
Copy Markdown
Owner

reisraff commented Jul 3, 2018

Oh, man, I appreciate your contribution, but since, we had the problem of autoload, we must take on mind that until this line https://github.com/igk1972/phulp/blob/64dd84392b24b5bb873708a0c2268e16f0af4a26/bin/phulp.php#L64 we dont have sure that the autoload was successfuly initialized.

So I liked you PR, I just would ask you to change this behavior for, ask the files with glob, and assert the name with regex, that ensure we are not using dependencies on the phulp.php (bootstraper).

Thanks man.

@reisraff reisraff merged commit 9ebf88f into reisraff:master Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants