removed hack for Doctrine annotations

This commit is contained in:
Fabien Potencier
2017-03-15 09:58:01 -07:00
parent 9b8e228df4
commit cd5e8139e1
2 changed files with 2 additions and 14 deletions
+1 -7
View File
@@ -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')) {