diff --git a/Extractor/Handler/JmsSecurityExtraHandler.php b/Extractor/Handler/JmsSecurityExtraHandler.php deleted file mode 100644 index 1905fdc..0000000 --- a/Extractor/Handler/JmsSecurityExtraHandler.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Nelmio\ApiDocBundle\Extractor\Handler; - -use JMS\SecurityExtraBundle\Annotation\PreAuthorize; -use JMS\SecurityExtraBundle\Annotation\Secure; -use Nelmio\ApiDocBundle\Annotation\ApiDoc; -use Nelmio\ApiDocBundle\Extractor\HandlerInterface; -use Symfony\Component\Routing\Route; - -class JmsSecurityExtraHandler implements HandlerInterface -{ - public function handle(ApiDoc $annotation, array $annotations, Route $route, \ReflectionMethod $method): void - { - foreach ($annotations as $annot) { - if ($annot instanceof PreAuthorize) { - $annotation->setAuthentication(true); - } elseif ($annot instanceof Secure) { - $annotation->setAuthentication(true); - $annotation->setAuthenticationRoles(is_array($annot->roles) ? $annot->roles : explode(',', $annot->roles)); - } - } - } -} diff --git a/Resources/config/services.xml b/Resources/config/services.xml index a03fcee..e79d223 100644 --- a/Resources/config/services.xml +++ b/Resources/config/services.xml @@ -9,7 +9,6 @@ Nelmio\ApiDocBundle\Twig\Extension\MarkdownExtension Nelmio\ApiDocBundle\Util\DocCommentExtractor - Nelmio\ApiDocBundle\Extractor\Handler\JmsSecurityExtraHandler Nelmio\ApiDocBundle\Extractor\Handler\PhpDocHandler Nelmio\ApiDocBundle\Parser\CollectionParser @@ -42,10 +41,6 @@ - - - -