Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit 0240aab

Browse files
committed
Autowire call replaced
1 parent 1d93b80 commit 0240aab

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/DependencyInjection/EWZRecaptchaExtension.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Symfony\Component\DependencyInjection\Reference;
1313
use Symfony\Component\Form\FormBuilder;
1414
use Symfony\Component\Form\FormBuilderInterface;
15+
use Symfony\Component\Form\FormFactoryInterface;
1516
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
1617

1718
/**
@@ -43,9 +44,11 @@ public function load(array $configs, ContainerBuilder $container)
4344
}
4445

4546
if (3 == $config['version']) {
46-
$container->autowire('ewz_recaptcha.form_builder_factory', EWZRecaptchaV3FormBuilderFactory::class);
47+
$container->register('ewz_recaptcha.form_builder_factory', EWZRecaptchaV3FormBuilderFactory::class)
48+
->addArgument(new Reference(FormFactoryInterface::class));
4749
} else {
48-
$container->autowire('ewz_recaptcha.form_builder_factory', EWZRecaptchaV2FormBuilderFactory::class);
50+
$container->register('ewz_recaptcha.form_builder_factory', EWZRecaptchaV2FormBuilderFactory::class)
51+
->addArgument(new Reference(FormFactoryInterface::class));
4952
}
5053
foreach($config['service_definition'] as $serviceDefinition) {
5154
$container->register('ewz_recaptcha.' . $serviceDefinition['service_name'], FormBuilderInterface::class)

0 commit comments

Comments
 (0)