dunglas / DunglasActionBundle

Symfony controllers, redesigned
https://dunglas.fr/2016/01/dunglasactionbundle-symfony-controllers-redesigned/
MIT License
256 stars 14 forks source link

Bugfix for non GLOB_BRACE exist platforms #73

Closed ismailbaskin closed 7 years ago

ismailbaskin commented 7 years ago

Popular Docker distro Alpine doesn't support GLOB_BRACE since it is using musl libc instead of GNU libc. I think very hard to debug this issue for developers so basically avoid brace usage.

https://github.com/symfony/finder/blob/master/Finder.php#L543 https://github.com/zendframework/zend-stdlib/issues/58 https://bugs.php.net/bug.php?id=72095 http://ftp.grokbase.com/t/php/php-doc-bugs/164rneeqx3/php-bug-bug-72095-new-undefined-constant-glob-brace-while-doc-base-configure-php

sstok commented 7 years ago

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

You are kidding me 😑💀 Alpine is basically the number one Docker distro for small applications.

Is it possible to detect if this feature is not supported and require the Symfony Finder instead when this happens?

ismailbaskin commented 7 years ago

Maybe we can use ternary condition with defined('GLOB_BRACE') as finder does.

dunglas commented 7 years ago

@sstok We already use the Symfony Finder: https://github.com/dunglas/DunglasActionBundle/blob/master/DependencyInjection/DunglasActionExtension.php#L86

insekticid commented 7 years ago

Could you please accept this fix? I stucked on this stupid problem too. I am using Alpine Linux based docker image. I have detected this problem via xdebug because dunglas_action.directories was empty array

dunglas commented 7 years ago

Thanks @insekticid