added the new @required annotation support

This commit is contained in:
Fabien Potencier
2017-03-01 13:02:56 -08:00
parent 9bcbe70179
commit 9fc344dbef
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env php
<?php
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Dotenv\Dotenv;
@@ -13,6 +14,7 @@ set_time_limit(0);
$loader = require __DIR__.'/../vendor/autoload.php';
if (class_exists(AnnotationRegistry::class)) {
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
AnnotationReader::addGlobalIgnoredName('required');
}
if (!class_exists(Application::class)) {
@@ -3,11 +3,13 @@
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');
}
// The check is to ensure we don't use .env in production