Skip to content
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

Caching And Env #5

Closed
krizzdev opened this issue Jun 28, 2016 · 5 comments
Closed

Caching And Env #5

krizzdev opened this issue Jun 28, 2016 · 5 comments

Comments

@krizzdev
Copy link
Contributor

I wasn't able to send my exceptions to the errorstream service.
I noticed, that in the ErrorStreamServiceProvider you make direct acces with the env() method.
like: env('ERROR_STREAM_API_TOKEN');

Since laravel 5.2 it is not recommended to use env() outside from the config files.
"If you are calling env from within your application, it is strongly recommended you add proper configuration values to your configuration files and call env from that location instead, allowing you to convert your env calls to config calls."

So I suggest to use the config() method inside the service provider and make an additional entry in a config file.

Otherwise it don't work for me.

I will make a pull request.

@krizzdev
Copy link
Contributor Author

#6

@kevinhamilton
Copy link
Member

Hey Chris,

Thanks for making the pull request. I'll have to check compatibility with Laravel 5.1 before I move forward. If not I think we can switch to publishing some assets.

We have clients using Laravel 5.2 - myself included. I was also able to install and test it on a Laravel 5.2.39 installation. I'll contact you via your support ticket.

@krizzdev
Copy link
Contributor Author

Hey Kevin,

thanks for the quick reply.
Yes, I dunno why env() always return null. Had this a month ago for another
project. I will try to run errorstream-laravel on a fresh install later.

Seems its an dotEnv issue also.
vlucas/phpdotenv#76 (comment)

2016-06-28 17:03 GMT+02:00 Kevin Hamilton notifications@github.com:

Hey Chris,

Thanks for making the pull request. I'll have to check compatibility with
Laravel 5.1 before I move forward. If not I think we can switch to
publishing some assets.

We have clients using Laravel 5.2 - myself included. I was also able to
install and test it on a Laravel 5.2.39 installation. I'll contact you via
your support ticket.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFEQtc-4wohKHg1Wy61s33jPOL_rezroks5qQTfXgaJpZM4JAJAF
.

@kevinhamilton
Copy link
Member

Interesting read, thanks for linking that issue @chrissfr i'll get an update pushed out today.

@kevinhamilton
Copy link
Member

Merged and available in 2.0 release of errorstream/errorstream-laravel. Should be available to install via composer now.

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

No branches or pull requests

2 participants