It seems there is a large number of Facades available to Lumen but there is no way of enabling many of them unless you modify the function withFacades. I think it would be better to be able to enable facades from bootstrap/app.php as this is advertised as the only place you need to configure.
lol. @GrahamCampbell don't you think it is kinda rude to close issues without giving any reason.
@GrahamCampbell @RichardKeep
Maybe I didn't explain my report well enough. What I am reporting isn't really a code bug, its more of a product bug. In the official documentation we are told that if we want to use facades to enable them in the bootstrap/app.php file. When you do this, you would probably expect to have access to all facades in the /vendor/illuminate/Support/Facades folder (I know I did). I spent a while trying to work out why the File facade wasn't working. I found the method withFacades in /vendor/laravel/lumen-framework/Application.php and noticed that it wasn't enabled just by enabling withFacades in app.php, I had to add the File facade to this function.
This sort of behavior is confusing. If Lumen is going to advertise a single place for configuration, you should get the behavior you expect -> enabling withFacades should enable all facades that can be used with Lumen.
At least there should be a list in the documentation of the facades this function enables, because most of the facades in Laravel are not accessible here, and turning on withFacades does basically nothing...?
I also agree that closing this issue without giving a reason was very rude and not professional at all...
anyway, personal opinions apart, I am also trying to understand why does the framework make those assumptions for us, I also want to use other facades, so having this method doesn't make any sense for me, everything could be aliased in bootstrap/app.php... or withFacades could support an array of short facade names like ['Auth', 'Cache', 'DB'] . That would be more flexible.
So, could you consider reopening this issue? Thanks
and turning on withFacades does basically nothing...?
turning on withFacades inject the application IoC to Illuminate\Support\Facades\Facade. Without doing so even if you're importing Illuminate\Support\Facades\File it wouldn't work.
someone might find it useful:
$app->withFacades(true, [
'Tymon\JWTAuth\Facades\JWTAuth' => 'JWTAuth'
]);
Most helpful comment
someone might find it useful: