Skip to content
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

Merged
merged 4 commits into from
Apr 17, 2013

Conversation

fvilpoix
Copy link
Contributor

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.

@inalgnu
Copy link

inalgnu commented Apr 12, 2013

👍

@baldurrensch
Copy link
Contributor

Seems to be similar to #107

$definition = $container->getDefinition(
'nelmio_api_doc.extractor.api_doc_extractor'
);
$taggedServices = $container->findTaggedServiceIds(
Copy link
Contributor

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.

@fvilpoix
Copy link
Contributor Author

Thx @stof for all your comments. I've just implementend all of its.
The EmptyHandler was just in case someone would not use default Handlers, and replace the parsing of may FOS/Rest Parameters by nothing. As the defaults handlers has been set to private, the EmptyHandler is useless, so I removed it.

/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what?

@fvilpoix
Copy link
Contributor Author

Oups ^^

@willdurand
Copy link
Collaborator

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;
Copy link
Contributor

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;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless blank line

willdurand added a commit that referenced this pull request Apr 17, 2013
Moving annotation extraction into tagged Handlers
@willdurand willdurand merged commit 08eebf0 into nelmio:master Apr 17, 2013
@willdurand
Copy link
Collaborator

thanks!

@fvilpoix fvilpoix deleted the annotation_handlers branch January 28, 2019 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants