Skip to content

Commit

Permalink
Check for existence of vendor directory for better error message
Browse files Browse the repository at this point in the history
replicates #1301 for the web entry point
  • Loading branch information
94noni authored Jul 3, 2024
1 parent 5ef0c5a commit ed28e4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions symfony/framework-bundle/7.2/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

use App\Kernel;

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".');
}

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $context) {
Expand Down

0 comments on commit ed28e4c

Please sign in to comment.