-
-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving annotation extraction into tagged Handlers #177
Conversation
👍 |
Seems to be similar to #107 |
$definition = $container->getDefinition( | ||
'nelmio_api_doc.extractor.api_doc_extractor' | ||
); | ||
$taggedServices = $container->findTaggedServiceIds( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. You are only accessing tagged services of NelmioApiDocBundle bundle here. If you want to access it for any bundle, you need to use a compiler pass.
Thx @stof for all your comments. I've just implementend all of its. |
/* | ||
* This file is part of the Sonata project. | ||
* | ||
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what?
Oups ^^ |
looks good 👍 |
@@ -16,6 +16,7 @@ | |||
use Symfony\Component\DependencyInjection\ContainerBuilder; | |||
use Symfony\Component\Config\Definition\Processor; | |||
use Symfony\Component\Config\FileLocator; | |||
use Symfony\Component\DependencyInjection\Reference; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks unused
namespace Nelmio\ApiDocBundle\Extractor; | ||
|
||
use Nelmio\ApiDocBundle\Annotation\ApiDoc; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless blank line
Moving annotation extraction into tagged Handlers
thanks! |
Just code refactoring, extracting the custom annotations parsing to specific handlers, which are services.
Anyone can easily add new Annotation support providing a new handler, as it use tagged services.