Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[5.8] Upgrade to dotenv v3 #27044
What's new in dotenv v3 that will affect Laravel? The
Finally, a consequence of the improvements in (#300) mean that the new way to construct a
Jan 3, 2019
Is it possible to add support for required variables in laravel.
@ankurk91 Thinking more about this, actually a custom boostrapper in the current framework is actually a bit of a pain. While it's nice and easy to replace it in your app (in the two kernels), it's actually also hard coded within the application's
I'm gonna have a think about how we can make this nice to use.
Thanks for looking into it.
May be if we can add something like this our
Then framework can use this array like
$dotenv = Dotenv::create(/* ... */) $requiredVars = explode(",", env('REQUIRED_VARS')) $dotenv->required($requiredVars)->notEmpty();
I think I'd prefer the user defined implementation still.
I've been looking into this some more, and this bootstrapping callback is not used anywhere actually, by the framework core, so as long as you don't use it in your code, it should be fine. If you'd want to use that method to register a callback, it can be done, but call