mirror of
https://github.com/symfony/recipes.git
synced 2026-09-12 07:36:30 +03:00
added the new @required annotation support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user