diff --git a/app/Exceptions/GithubReport.php b/app/Exceptions/GithubReport.php index fc2cc7a..c9635a4 100644 --- a/app/Exceptions/GithubReport.php +++ b/app/Exceptions/GithubReport.php @@ -84,7 +84,7 @@ class GithubReport $report->phpVersion = PHP_VERSION; $report->redisRunning = false; - if (env('CACHING') && env('CACHE_DRIVER') === 'redis') { + if (env('CACHING') && strtolower(env('CACHE_DRIVER')) === 'redis') { try { $report->redisRunning = trim(app('redis')->ping()) === 'PONG' ? "Connected" : "Disconnected"; } catch (ConnectionException $e) { diff --git a/app/Http/Middleware/MicroCaching.php b/app/Http/Middleware/MicroCaching.php index e8980e2..87fd691 100644 --- a/app/Http/Middleware/MicroCaching.php +++ b/app/Http/Middleware/MicroCaching.php @@ -49,7 +49,7 @@ class MicroCaching if ( !env('CACHING') || !env('MICROCACHING') - || env('CACHE_DRIVER') !== 'redis' + || strtolower(env('CACHE_DRIVER')) !== 'redis' ) { return $next($request); } diff --git a/bootstrap/app.php b/bootstrap/app.php index 913236b..74d7ef6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -100,11 +100,8 @@ $app->routeMiddleware([ | */ -if (env('CACHING')) { - $app->configure('cache'); - $app->register(Illuminate\Redis\RedisServiceProvider::class); -} +$app->configure('cache'); $app->configure('database'); $app->configure('queue'); $app->configure('controller-to-table-mapping'); @@ -118,8 +115,9 @@ $app->register(\App\Providers\SourceHeartbeatProvider::class); $app->register(\App\Providers\EventServiceProvider::class); $app->register(Illuminate\Database\Eloquent\LegacyFactoryServiceProvider::class); $app->register(\App\Providers\AppServiceProvider::class); +$app->register(Illuminate\Redis\RedisServiceProvider::class); -if (env('REPORTING') && env('REPORTING_DRIVER') === 'sentry') { +if (env('REPORTING') && strtolower(env('REPORTING_DRIVER')) === 'sentry') { $app->register(\Sentry\Laravel\ServiceProvider::class); // Sentry Performance Monitoring (optional) $app->register(\Sentry\Laravel\Tracing\ServiceProvider::class); @@ -130,13 +128,6 @@ if (env('REPORTING') && env('REPORTING_DRIVER') === 'sentry') { }); } -// Guzzle removed as of lumen 8.x -//$guzzleClient = new \GuzzleHttp\Client([ -// 'timeout' => env('SOURCE_TIMEOUT', 5), -// 'connect_timeout' => env('SOURCE_CONNECT_TIMEOUT', 5) -//]); -//$app->instance('GuzzleClient', $guzzleClient); - $httpClient = \Symfony\Component\HttpClient\HttpClient::create( [ 'timeout' => env('SOURCE_TIMEOUT', 1)