Skip to content

List tags that are automatically applied for you with autoconfigure enabled #9229

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

Closed
aaa2000 opened this issue Feb 8, 2018 · 4 comments
Closed

Comments

@aaa2000
Copy link

aaa2000 commented Feb 8, 2018

In https://github.com/symfony/symfony-docs/blob/4.0/service_container/tags.rst#autoconfiguring-tags, the documentation only mentions twig.extension tag.

Having the list increases the readability of the file by reducing its size.

It seems to me that the implemantion of these interfaces are automaticaly tagged:

interface/class tag
Twig_ExtensionInterface::class twig.extension
Twig_LoaderInterface::class twig.loader
Twig\Extension\ExtensionInterface twig.extension
Twig\Loader\LoaderInterface twig.loader
Twig\Extension\RuntimeExtensionInterface twig.runtime
Symfony\Component\Console\Command\Command console.command
Symfony\Component\Config\ResourceCheckerInterface config_cache.resource_checker
Symfony\Component\DependencyInjection\EnvVarProcessorInterface container.env_var_processor
Symfony\Component\DependencyInjection\ServiceSubscriberInterface container.service_subscriber
Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface controller.argument_value_resolver
Symfony\Bundle\FrameworkBundle\Controller\AbstractController controller.service_arguments
Symfony\Bundle\FrameworkBundle\Controller\Controller controller.service_arguments
Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface data_collector
Symfony\Component\Form\FormTypeInterface form.type
Symfony\Component\Form\FormTypeGuesserInterface form.type_guesser
Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface kernel.cache_clearer
Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface kernel.cache_warmer
Symfony\Component\EventDispatcher\EventSubscriberInterface kernel.event_subscriber
Symfony\Component\Cache\ResettableInterface kernel.reset
Symfony\Component\PropertyInfo\PropertyListExtractorInterface property_info.list_extractor
Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface property_info.type_extractor
Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface property_info.description_extractor
Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface property_info.access_extractor
Symfony\Component\Serializer\Encoder\EncoderInterface serializer.encoder
Symfony\Component\Serializer\Encoder\DecoderInterface serializer.encoder
Symfony\Component\Serializer\Normalizer\NormalizerInterface serializer.normalizer
Symfony\Component\Serializer\Normalizer\DenormalizerInterface serializer.normalizer
Symfony\Component\Validator\ConstraintValidatorInterface validator.constraint_validator
Symfony\Component\Validator\ObjectInitializerInterface validator.initializer
Symfony\Component\Security\Core\Authorization\Voter\VoterInterface security.voter

https://github.com/symfony/symfony/blob/44b2f97dcd2ba10857dd545e424ad4f48c9dbea1/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php#L154

https://github.com/symfony/symfony/blob/374f6e2353781709356e334665539bc31f2c4e11/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L285

https://github.com/symfony/symfony/blob/302f33702dcf29dbfdd09c72cdf69273fe8c60a6/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L121

Are there others autoconfiguring tags ?

@javiereguiluz
Copy link
Member

@aaa2000 I appreciate your proposal to improve Symfony Docs. However, we usually reject ideas like this because it makes docs too dependent on the code. Maintaining a list like that is really hard for us because we must continually check that is updated with the latest code changes.

Given that we are trying to simplify our work on docs, I'm 👎 about this proposal. I'm sorry but I hope you understand why I vote that. Thanks!

javiereguiluz added a commit that referenced this issue Mar 12, 2018
This PR was merged into the master branch.

Discussion
----------

[Serializer] Max depth handler support

Documents symfony/symfony#26108. Closes #9317 and #9229.

Commits
-------

ef46c8c [Serializer] Max depth handler support
@javiereguiluz
Copy link
Member

Closing for the reasons explained above. I hope you understand it. Thanks!

@webmozart
Copy link
Contributor

webmozart commented Mar 26, 2021

Just stumbled across this issue while looking precisely for this list. Is this really not documented anywhere? IMO this is a perfect candidate for the DX initiative. (ping @weaverryan)

This list seems to be a perfect candidate for the Reference to me. Thanks @aaa2000 for compiling it.

However, we usually reject ideas like this because it makes docs too dependent on the code.

A very similar list is already in the reference (Tag List), hence I don't think this argument holds.

👍 for reopening this issue

@wouterj
Copy link
Member

wouterj commented Mar 26, 2021

I think best is to add a debug command for this (similar to debug:autowiring). symfony/symfony#26295

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

No branches or pull requests

4 participants