Closed jfoliveira closed 8 years ago
I haven't tested it with Lumen. The idea is that it should be supported, however, will run some tests and see how it goes.
Thanks for raising the issue
One change you might want to make is on src/EnvValidatorFactory.php
:
public static function buildFromLaravelConfig()
{
// $config = \Config::get('laravel-env-validator'); # doesn't work with Lumen
$config = config('laravel-env-validator'); # <<< this works with Lumen. Not sure if it works with Laravel
Also, I would suggest creating a separate LumenServiceProvider
to make it easier for you to maintain the package having the providers completely independent.
Good idea.
On 22 February 2016 at 12:25, jfoliveira notifications@github.com wrote:
One change you might you want to make is src/EnvValidatorFactory.php
public static function buildFromLaravelConfig(){ // $config = \Config::get('laravel-env-validator'); # doesn't work with Lumen $config = config('laravel-env-validator'); # <<< this works with Lumen. Not sure if it works with Laravel
Also, I would suggest creating a separate LumenServiceProvider to make it easier for you to maintain the package having the providers completely independent.
— Reply to this email directly or view it on GitHub https://github.com/mathiasgrimm/laravel-env-validator/issues/6#issuecomment-187151591 .
In case you need references, I would suggest:
laravel-cors
:
https://github.com/barryvdh/laravel-cors/blob/master/src/LumenServiceProvider.php
jwt-auth
:
https://github.com/tymondesigns/jwt-auth/blob/develop/src/Providers/LumenServiceProvider.php
Nice, will have a look on them!
Would you like to test yourself and submit a PR maybe? :)
On 22 February 2016 at 12:31, jfoliveira notifications@github.com wrote:
In case you need references, I would suggest: laravel-cors:
https://github.com/barryvdh/laravel-cors/blob/master/src/LumenServiceProvider.php
jwt-auth:
https://github.com/tymondesigns/jwt-auth/blob/develop/src/Providers/LumenServiceProvider.php
— Reply to this email directly or view it on GitHub https://github.com/mathiasgrimm/laravel-env-validator/issues/6#issuecomment-187152892 .
Ok, will do. Would you mind creating a develop
branch to make it easier to use git flow
?
Please ignore my last comment about creating develop branch. I set up git flow
on my fork and it's fine. Thanks!
Done #7
+1 for Lumen support. I've just downloaded and it's not working with Lumen. :-( Is this package ready for using with Lumen now?
Done!
Hi, thanks for publishing this very useful package!
I know the package name says
Laravel
but as Laravel and Lumen are often used together I'm curious:is this package supposed to work with Lumen?
Tried it on a Lumen project and this exception is raised:
It seems many other packages had the same issue in the past
If Lumen is not aimed to be supported please let us know.
Thanks!