Skip to content

Commit

Permalink
Merge pull request #262 from alexander-schranz/patch-2
Browse files Browse the repository at this point in the history
Fix compatibility to older symfony version
  • Loading branch information
excelwebzone authored Jan 26, 2021
2 parents 65ef7a3 + c5340f6 commit 41c9828
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/DependencyInjection/EWZRecaptchaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
Expand Down Expand Up @@ -41,10 +40,10 @@ public function load(array $configs, ContainerBuilder $container)

if (3 == $config['version']) {
$container->register('ewz_recaptcha.form_builder_factory', EWZRecaptchaV3FormBuilderFactory::class)
->addArgument(new Reference(FormFactoryInterface::class));
->addArgument(new Reference('form.factory'));
} else {
$container->register('ewz_recaptcha.form_builder_factory', EWZRecaptchaV2FormBuilderFactory::class)
->addArgument(new Reference(FormFactoryInterface::class));
->addArgument(new Reference('form.factory'));
}

foreach ($config['service_definition'] as $serviceDefinition) {
Expand Down

0 comments on commit 41c9828

Please sign in to comment.