Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Add autoconfigure tag for ParamConverterInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
B-Galati committed Oct 2, 2017
1 parent 74f1f17 commit 678538e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DependencyInjection/SensioFrameworkExtraExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Sensio\Bundle\FrameworkExtraBundle\DependencyInjection;

use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
Expand Down Expand Up @@ -47,6 +48,9 @@ public function load(array $configs, ContainerBuilder $container)
if ($config['request']['converters']) {
$annotationsToLoad[] = 'converters.xml';

$container->registerForAutoconfiguration(ParamConverterInterface::class)
->addTag('request.param_converter');

$container->setParameter('sensio_framework_extra.disabled_converters', is_string($config['request']['disable']) ? implode(',', $config['request']['disable']) : $config['request']['disable']);

$container->addResource(new ClassExistenceResource(ExpressionLanguage::class));
Expand Down

0 comments on commit 678538e

Please sign in to comment.