diff --git a/README.md b/README.md index 967832b..ac2dd91 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ This bundle supports the following Oro Platform versions: * Oro Platform v4.2.x - Support for this version is on the "v4.2.x" branch +* Oro Platform v5.x + - Support for this version is on the "v5.x" branch + The Master branch will always track support for the latest released Oro Platform version. Installation and Usage @@ -43,14 +46,6 @@ Installation and Usage # locale_key: %kernel.default_locale% # etc. Refer to the ewz_recaptcha package for more information. - - # optional, modify key values if you need to override this bundle's default settings - hack_oro_recaptcha: - settings: - #theme: light - #size: normal - #protect_registration: true - #protect_contact_form: true ``` 1. Purge Oro cache: ```bash diff --git a/composer.json b/composer.json index 78191f1..6564ae7 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Oro Bundle to inject ReCAPTCHA into public forms", "type": "project", "require": { - "oro/platform": "4.2.*", + "oro/platform": "5.0.*", "excelwebzone/recaptcha-bundle": "^1.5" }, "autoload": { diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index edc039f..e874257 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -30,8 +30,8 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root(HackOroRecaptchaExtension::ALIAS); + $treeBuilder = new TreeBuilder(HackOroRecaptchaExtension::ALIAS); + $rootNode = $treeBuilder->getRootNode(); SettingsBuilder::append( $rootNode, @@ -47,12 +47,15 @@ public function getConfigTreeBuilder() return $treeBuilder; } - /** - * @param string $key - * @return string - */ - public static function getConfigKeyByName($key) + + /** + * Returns full key name by it's last part + * + * @param $name string last part of the key name (one of the class cons can be used) + * @return string full config path key + */ + public static function getConfigKeyByName($name) { - return implode(ConfigManager::SECTION_MODEL_SEPARATOR, [HackOroRecaptchaExtension::ALIAS, $key]); + return HackOroRecaptchaExtension::ALIAS . ConfigManager::SECTION_MODEL_SEPARATOR . $name; } }