-
Notifications
You must be signed in to change notification settings - Fork 23
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
php artisan config:cache #47
Comments
Yes, it seems to work with an include on the config file instead of the laravel https://github.com/Edujugon/laravel-google-ads/blob/master/src/Support/helpers.php#L52-L67 There is a workaround, you might give this a try in your return [
'env' => 'test',
'test' => [
'developerToken' => env('GOOGLE_ADS_DEVELOPER_TOKEN', config('google-ads.test.developerToken')),
'clientCustomerId' => env('GOOGLE_ADS_CUSTOMER_ID', config('google-ads.test.clientCustomerId')),
// ...
],
]; |
Looks nasty, but it might work. I've tried to recreate the error of this issue, but it seems to be working fine atm. Even without the workaround, it's still able to get the filled contents of google-ads.php. It seems the behavior of |
This didn't work for me since the test variables are also in the .env file, and thus using env(). I can +1 that the issue only occurs when the config is cached. |
I've setup my google-ads.php config file with env() helpers, because I want to follow the good practice of not putting credentials in my repo history.
However when I run
php artisan config:cache
, the google ads package isn't working anymore. I guess that the package is still looking in the google-ads.php file, which now returns null on each value, because when you runphp artisan config:cache
. The env() will always return null.The text was updated successfully, but these errors were encountered: