Skip to content

Commit

Permalink
Merge pull request #20 from retailcrm/duglas-remove
Browse files Browse the repository at this point in the history
remove the support of duglas
  • Loading branch information
muxx authored Oct 1, 2024
2 parents eba661d + 4b6137f commit 73f9b9e
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 535 deletions.
37 changes: 0 additions & 37 deletions DependencyInjection/AnnotationsProviderCompilerPass.php

This file was deleted.

189 changes: 0 additions & 189 deletions Extractor/AnnotationsProvider/DunglasApiProvider.php

This file was deleted.

27 changes: 0 additions & 27 deletions Extractor/AnnotationsProviderInterface.php

This file was deleted.

13 changes: 2 additions & 11 deletions Extractor/ApiDocExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ class ApiDocExtractor
protected array $parsers = [];

/**
* @param HandlerInterface[] $handlers
* @param AnnotationsProviderInterface[] $annotationsProviders
* @param string[] $excludeSections
* @param HandlerInterface[] $handlers
* @param string[] $excludeSections
*/
public function __construct(
protected RouterInterface $router,
protected Reader $reader,
protected DocCommentExtractor $commentExtractor,
protected array $handlers,
protected array $annotationsProviders,
protected array $excludeSections,
) {
}
Expand Down Expand Up @@ -129,13 +127,6 @@ public function extractAnnotations(array $routes, $view = ApiDoc::DEFAULT_VIEW)
}
}

foreach ($this->annotationsProviders as $annotationProvider) {
foreach ($annotationProvider->getAnnotations() as $annotation) {
$route = $annotation->getRoute();
$array[] = ['annotation' => $this->extractData($annotation, $route, $this->getReflectionMethod($route->getDefault('_controller')))];
}
}

rsort($resources);
foreach ($array as $index => $element) {
$hasResource = false;
Expand Down
10 changes: 4 additions & 6 deletions Extractor/CachingApiDocExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,20 @@
class CachingApiDocExtractor extends ApiDocExtractor
{
/**
* @param HandlerInterface[] $handlers
* @param AnnotationsProviderInterface[] $annotationsProviders
* @param string[] $excludeSections
* @param bool|false $debug
* @param HandlerInterface[] $handlers
* @param string[] $excludeSections
* @param bool|false $debug
*/
public function __construct(
RouterInterface $router,
Reader $reader,
DocCommentExtractor $commentExtractor,
array $handlers,
array $annotationsProviders,
array $excludeSections,
private string $cacheFile,
private bool $debug = false,
) {
parent::__construct($router, $reader, $commentExtractor, $handlers, $annotationsProviders, $excludeSections);
parent::__construct($router, $reader, $commentExtractor, $handlers, $excludeSections);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions NelmioApiDocBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Nelmio\ApiDocBundle;

use Nelmio\ApiDocBundle\DependencyInjection\AnnotationsProviderCompilerPass;
use Nelmio\ApiDocBundle\DependencyInjection\ExtractorHandlerCompilerPass;
use Nelmio\ApiDocBundle\DependencyInjection\FormInfoParserCompilerPass;
use Nelmio\ApiDocBundle\DependencyInjection\LoadExtractorParsersPass;
Expand All @@ -20,7 +19,6 @@ public function build(ContainerBuilder $container): void
$container->addCompilerPass(new LoadExtractorParsersPass());
$container->addCompilerPass(new RegisterExtractorParsersPass());
$container->addCompilerPass(new ExtractorHandlerCompilerPass());
$container->addCompilerPass(new AnnotationsProviderCompilerPass());
$container->addCompilerPass(new SwaggerConfigCompilerPass());
$container->addCompilerPass(new FormInfoParserCompilerPass());
}
Expand Down
Loading

0 comments on commit 73f9b9e

Please sign in to comment.