From 06ee2ef0fd220ff691a1cb166ca7879bed7f8115 Mon Sep 17 00:00:00 2001 From: Gustavo Nieves <37160403+TavoNiievez@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:32:16 -0500 Subject: [PATCH] Update docs with PHP file config Symfony 6 will recommend the use of PHP files instead of YAML for config, so it's convenient to show users how to perform PHP config from now on. --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 432c512..d0e8e9f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 + +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