-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Duplicate function name with Laravel #180
Comments
Thanks for the info. |
I'm using the package with a require before # public/index.php
require __DIR__.'/../vendor/gettext/gettext/src/translator_functions.php';
require __DIR__.'/../vendor/autoload.php'; # artisan
require __DIR__.'/vendor/gettext/gettext/src/translator_functions.php';
require __DIR__.'/vendor/autoload.php'; Regards, |
Yes, that's another solution. But it's... inelegant. You make a strong coupling with a vendor library, while Laravel recently introduced auto-discovery feature to reduce this. To be honest, the Composer hack isn't much better, but in theory Gettext could control it. If only there was a way to force Composer to include |
Is not the best way to do it, but it's almost clear. Laravel |
Hi,
It seems that both Gettext and Laravel are defining
__()
function. Although Laravel wraps their definition withfunction_exists()
, it's not normally possible to register Gettext's functions before Laravel'shelpers.php
is loaded, as it's automatically included with Composer.The only solution I've found so far (other than messing in vendor files) is https://github.com/funkjedi/composer-include-files.
The text was updated successfully, but these errors were encountered: