Lumen artisan console does not use bootstrap/app.php
Is it me or does Lumen only loads the minimal stack within Job and Console.
Nothing from bootstrap/app.php gets loaded
I have config/* loaded in bootstrap/app.php but when constructed my Command and config('app'); it returned null. I would need the a bunch of configuration setting that has been already implemented there instead of reverting back to env() which defeated the point in having config/* enabled by doing:
$app->configure('database');
in the first place.
Am I understanding the framework incorrectly or are these the nuances between lumen and laravel where Laravel full stack wouldnt be doing this to me.
Just to let you know the same it's happening to me here, no config from app.php it's accessible from my console Commands but not sure what will be the best work around to fix this.
I have found that this is a problem with cron not being able to read the environment variables nothing to do with Laravel/Lumen at least that's my issue (haven't found a solution yet)
As far as I can see this particular situation the variables are instantiated at the instance level so it will run without issue - however this means its untestable which is fine I believe - but that also means I will have to pre-make the instance which means integrated tests are tossed since I can't run aws-elastic-beanstalk local and will rely on interface and install a local elasticsearch
I'm still looking on solutions but I might just decide to load everything via IoC
I have heard that the diff between Laravel vs Lumen is that the IoC is lazy loaded and might influenced in this dicussion - hoping someone can verify that.
I've been trying all day to make my cron jobs load my environment variables without success :(
I've been trying different things trying to achieve the same goal run a cron job as if it where running from the command line (with all my environment variables) on the link below you'll find more info about what I was trying to do.
utilizing the fact that i can call any given .env variables freely within lumen - i basically defy the laravel vs lumen part and started to ignore the configuration variables and utilize the set variables within .env file
my next step is to see if my lazy loading assumption is correct or not and go from there.