Answer the question
In order to leave comments, you need to log in
When opening a site on Symfony, it gives an error SymfonyRuntime?
When you first start the site on Symfony, it gives an error:
Argument 1 passed to Symfony\Component\Runtime\SymfonyRuntime::getRunner() must be an instance of Symfony\Component\Runtime\object or null, instance of App\Kernel given...
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
use Symfony\Component\HttpFoundation\Response;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function () {
return new Response('Hello world');
};
Return value of Symfony\Component\HttpFoundation\Response::setStatusCode() must be an instance of Symfony\Component\HttpFoundation\object, instance of Symfony\Component\HttpFoundation\Response returned
Answer the question
In order to leave comments, you need to log in
It turned out that my domain had an outdated version of 7.1, not 7.3. It was necessary to just update the php version, and not write "platform-check": false
Special thanks to Anton for giving me the idea to double-check the php version
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question