Skip to content

Commit 61ba5da

Browse files
committed
Changement services file format and renamed certain functions
1 parent af12f1b commit 61ba5da

File tree

4 files changed

+23
-32
lines changed

4 files changed

+23
-32
lines changed

DependencyInjection/EWZRecaptchaExtension.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function load(array $configs, ContainerBuilder $container)
2222
$configuration = new Configuration();
2323
$config = $this->processConfiguration($configuration, $configs);
2424

25-
$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26-
$loader->load('services.xml');
25+
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26+
$loader->load('services.yml');
2727

2828
foreach ($config as $key => $value) {
2929
$container->setParameter('ewz_recaptcha.'.$key, $value);

Form/Type/RecaptchaType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getParent()
124124
/**
125125
* {@inheritdoc}
126126
*/
127-
public function getName()
127+
public function getBlockPrefix()
128128
{
129129
return 'ewz_recaptcha';
130130
}

Resources/config/services.xml

-29
This file was deleted.

Resources/config/services.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
ewz_recaptcha.form.type:
3+
class: EWZ\Bundle\RecaptchaBundle\Form\Type\RecaptchaType
4+
arguments:
5+
- '%ewz_recaptcha.public_key%'
6+
- '%ewz_recaptcha.enabled%'
7+
- '%ewz_recaptcha.ajax%'
8+
- '%ewz_recaptcha.locale_key%'
9+
tags:
10+
- { name: form.type, alias: ewz_recaptcha }
11+
12+
ewz_recaptcha.validator.true:
13+
class: EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrueValidator
14+
arguments:
15+
- '%ewz_recaptcha.enabled%'
16+
- '%ewz_recaptcha.private_key%'
17+
- '%ewz_recaptcha.http_proxy%'
18+
- '@request_stack'
19+
tags:
20+
- { name: validator.constraint_validator }

0 commit comments

Comments
 (0)