mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 15:46:37 +03:00
removed hack for Doctrine annotations
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Doctrine\Common\Annotations\AnnotationReader;
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
@@ -12,11 +10,7 @@ use Symfony\Component\Debug\Debug;
|
||||
umask(0000);
|
||||
set_time_limit(0);
|
||||
|
||||
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||
if (class_exists(AnnotationRegistry::class)) {
|
||||
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||
AnnotationReader::addGlobalIgnoredName('required');
|
||||
}
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
if (!class_exists(Application::class)) {
|
||||
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
|
||||
|
||||
@@ -4,14 +4,8 @@ use App\Kernel;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Debug\Debug;
|
||||
use Doctrine\Common\Annotations\AnnotationReader;
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
|
||||
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||
if (class_exists(AnnotationRegistry::class)) {
|
||||
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||
AnnotationReader::addGlobalIgnoredName('required');
|
||||
}
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
// The check is to ensure we don't use .env in production
|
||||
if (!getenv('APP_ENV')) {
|
||||
|
||||
Reference in New Issue
Block a user