diff --git a/symfony/framework-bundle/7.2/public/index.php b/symfony/framework-bundle/7.2/public/index.php index 9982c218d..929e21c13 100644 --- a/symfony/framework-bundle/7.2/public/index.php +++ b/symfony/framework-bundle/7.2/public/index.php @@ -2,7 +2,17 @@ use App\Kernel; -require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; +if (!is_dir(dirname(__DIR__).'/vendor')) { + throw new LogicException('Dependencies are missing. Try running "composer install".'); +} + +if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { + throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); +} + +if (false === include dirname(__DIR__).'/vendor/autoload_runtime.php') { + throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); +} return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);