From 9f2e74dbbd8f0f9294bc3b030ebc966669320f36 Mon Sep 17 00:00:00 2001 From: Klas Date: Wed, 22 Jun 2022 14:31:00 +0200 Subject: [PATCH 1/5] Update composer json for 5.x --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 78191f1..4861095 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.*", "excelwebzone/recaptcha-bundle": "^1.5" }, "autoload": { From edfd7246477185e3f05ac72a0c3d2995f0e83325 Mon Sep 17 00:00:00 2001 From: Klas Berlic Fras Date: Wed, 22 Jun 2022 22:29:15 +0200 Subject: [PATCH 2/5] fix Di --- src/DependencyInjection/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index edc039f..2cdde1a 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, From 14262c4fa2e2a30755ded442a76fe29778df2ede Mon Sep 17 00:00:00 2001 From: Klas Berlic Fras Date: Thu, 23 Jun 2022 14:07:14 +0200 Subject: [PATCH 3/5] Adjust readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 967832b..bcdfb24 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 From 5a8eb6a3dc1e65208eba17ba0d7571e515265009 Mon Sep 17 00:00:00 2001 From: Klas Berlic Fras Date: Thu, 23 Jun 2022 19:13:01 +0200 Subject: [PATCH 4/5] Remove misledoing config section from Readme, this is set in backend --- README.md | 8 -------- src/DependencyInjection/Configuration.php | 15 +++++++++------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index bcdfb24..ac2dd91 100644 --- a/README.md +++ b/README.md @@ -46,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/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 2cdde1a..e874257 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -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; } } From b5e033f4b99b1e718a5d9e14283edcb4fe18cab7 Mon Sep 17 00:00:00 2001 From: Klas Date: Tue, 28 Jun 2022 11:39:58 +0200 Subject: [PATCH 5/5] Stricter Oro Platform version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4861095..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": "5.*", + "oro/platform": "5.0.*", "excelwebzone/recaptcha-bundle": "^1.5" }, "autoload": {