Description
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
sentry/sentry-laravel:2.4.0
PHP: 8.0.2 using declare(strict_types=1)
Steps to Reproduce
- Install latest version of Lumen framework (8.2.3 at time of writing) and sentry/sentry-laravel (2.4.0) via Composer
- Install as directed
- Boot the application
Expected Result
No errors thrown
Actual Result
An PHP Fatal Error is raised:
Uncaught TypeError: Sentry\\Laravel\\Http\\LaravelRequestFetcher::__construct(): Argument #1 ($app) must be of type Illuminate\\Contracts\\Foundation\\Application, Laravel\\Lumen\\Application given
Full stack trace:
PHP Fatal error: Uncaught TypeError: Sentry\\Laravel\\Http\\LaravelRequestFetcher::__construct(): Argument #1 ($app) must be of type Illuminate\\Contracts\\Foundation\\Application, Laravel\\Lumen\\Application given, called in [snip]/vendor/sentry/sentry-laravel/src/Sentry/Laravel/ServiceProvider.php on line 202 and defined in [snip]/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/LaravelRequestFetcher.php:20
Stack trace:
#0 [snip]/vendor/sentry/sentry-laravel/src/Sentry/Laravel/ServiceProvider.php(202): Sentry\\Laravel\\Http\\LaravelRequestFetcher->__construct()
#1 [snip]/vendor/sentry/sentry/src/Integration/IntegrationRegistry.php(112): Sentry\\Laravel\\ServiceProvider->Sentry\\Laravel\\{closure}()
#2 [snip]/vendor/sentry/sentry/src/Integration/IntegrationRegistry.php(55): Sentry\\Integration\\IntegrationRegistry->getIntegrationsToSetup()
#3 [snip]/vendor/sentry/sentry/src/Client.php(107): Sentry\\Integration\\IntegrationRegistry->setupIntegrations()
#4 [snip]/vendor/sentry/sentry/src/ClientBuilder.php(165): Sentry\\Client->__construct()
#5 [snip]/vendor/sentry/sentry-laravel/src/Sentry/Laravel/ServiceProvider.php(208): Sentry\\ClientBuilder->getClient()
#6 [snip]/vendor/illuminate/container/Container.php(826): Sentry\\Laravel\\ServiceProvider->Sentry\\Laravel\\{closure}()
#7 [snip]/vendor/illuminate/container/Container.php(712): Illuminate\\Container\\Container->build()
#8 [snip]/vendor/illuminate/container/Container.php(651): Illuminate\\Container\\Container->resolve()
#9 [snip]/vendor/laravel/lumen-framework/src/Application.php(300): Illuminate\\Container\\Container->make()
#10 [snip]/vendor/laravel/lumen-framework/src/helpers.php(42): Laravel\\Lumen\\Application->make()
#11 [snip]/app/Exceptions/Handler.php(37): app()
#12 [snip]/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(119): App\\Exceptions\\Handler->report()
#13 [snip]/vendor/laravel/lumen-framework/src/Concerns/RegistersExceptionHandlers.php(51): Laravel\\Lumen\\Application->handleException()
#14 [internal function]: Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}()
#15 {main}
thrown in [snip]/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/LaravelRequestFetcher.php on line 20
It is worth noting that this issue is only present in 2.4.0, downgrading to 2.3.1 has no problems. I suspect #419 doesn't support Lumen.
Metadata
Metadata
Assignees
Labels
No labels