laravel-kafka
laravel-kafka copied to clipboard
[BUG] Cannot declare class `App\Console\Kernel`, because the name is already in use
Hi, I'm using laravel-opcache and laravel-octane-dockerfile with Laravel Octane. Before starting the server and after running php artisan compile command to pre-compile application code (includes vendor directory), the following error will be thrown:
Symfony\Component\ErrorHandler\Error\FatalError
Cannot declare class App\Console\Kernel, because the name is already in use
at vendor/mateusjunges/laravel-kafka/dev/laravel-console-kernel.php:0
1▕ <?php
2▕
3▕ namespace App\Console;
4▕
5▕ use Illuminate\Console\Scheduling\Schedule;
6▕ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7▕
8▕ class Kernel extends ConsoleKernel
9▕ {
Whoops\Exception\ErrorException
Cannot declare class App\Console\Kernel, because the name is already in use
at vendor/mateusjunges/laravel-kafka/dev/laravel-console-kernel.php:0
1▕ <?php
2▕
3▕ namespace App\Console;
4▕
5▕ use Illuminate\Console\Scheduling\Schedule;
6▕ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7▕
8▕ class Kernel extends ConsoleKernel
9▕ {
+1 vendor frames
2 [internal]:0
Whoops\Run::handleShutdown()
I tried to exclude vendor/mateusjunges/laravel-kafka/dev directory from pre-compiling in laravel-opcache package config, but the problem still exists.