Skip to content

Commit

Permalink
Merge pull request #248 from TavoNiievez/patch-1
Browse files Browse the repository at this point in the history
Update docs with PHP file config
  • Loading branch information
excelwebzone committed Jul 30, 2020
2 parents 1b3c8ca + 06ee2ef commit 00eec1c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $bundles = array(

Add the following to your config file:

**NOTE** If you're using symfony 4, the config will be in `config/packages/ewz_recaptcha.yaml`. The local dev enviroment has its own config in `config/packages/dev/ewz_recaptcha.yaml`.
**NOTE**: If you're using symfony 4, the config will be in `config/packages/ewz_recaptcha.yaml`. The local dev enviroment has its own config in `config/packages/dev/ewz_recaptcha.yaml`.

``` yaml
# app/config/config.yml
Expand Down Expand Up @@ -112,6 +112,25 @@ ewz_recaptcha:
verify_host: true
```

**NOTE**: If you're using symfony 5 and want to configure the bundle with PHP files instead of YAML, the configuration is like this:

``` php
// config/packages/ewz_recaptcha.php

<?php declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $configurator): void
{
$configurator->extension('ewz_recaptcha', [
'public_key' => 'here_is_your_public_key',
'private_key' => 'here_is_your_private_key',
'locale_key' => '%kernel.default_locale%'
]);
};
```

Congratulations! You're ready!

## Basic Usage
Expand Down

0 comments on commit 00eec1c

Please sign in to comment.