build(cs): fix kernel and bootstrap

This commit is contained in:
Ondrej Vlach 2024-08-02 14:19:16 +02:00
parent bd3eaf8a17
commit 31155efabe
No known key found for this signature in database
GPG Key ID: 7F141CDACEDEE2DE
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace App; namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;

View File

@ -1,11 +1,13 @@
<?php <?php
declare(strict_types=1);
use Symfony\Component\Dotenv\Dotenv; use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php'; require dirname(__DIR__) . '/vendor/autoload.php';
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) { if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php'; require dirname(__DIR__) . '/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) { } elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); (new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
} }