Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

muragijimana's avatar

Methods with the same name as their class will not be constructors in a future version of PHP; Whois has a deprecated constructor

Hello, can anyone help know How I can fix the above problem, it is happening when I call ```require $this->basePath . '/bootstrap/autoload.php';

        $app = require_once $this->basePath . '/bootstrap/app.php';

        $kernel = $app->make('Illuminate\Contracts\Console\Kernel');
        $kernel->bootstrap();``` I understand that in php 7 this is to notify that no method that should have the same name as it's class but how can I fix this in laravel then? where is bootstrap method is defined? any help please.
0 likes
0 replies

Please or to participate in this conversation.