From 4309bafc0e734ca66abf725ff0bcc2d0ea9c150a Mon Sep 17 00:00:00 2001 From: Adam Hall Date: Mon, 6 Dec 2021 16:13:56 +1030 Subject: [PATCH 1/4] Set required to false, as now it defaults to true without the required * --- src/Form/Type/BraintreeIntegrationSettingsType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Form/Type/BraintreeIntegrationSettingsType.php b/src/Form/Type/BraintreeIntegrationSettingsType.php index d6450ef5c..fce3c6066 100644 --- a/src/Form/Type/BraintreeIntegrationSettingsType.php +++ b/src/Form/Type/BraintreeIntegrationSettingsType.php @@ -130,14 +130,16 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'vaultMode', CheckboxType::class, [ - 'label' => 'aligent.braintree.settings.vault_mode.label' + 'label' => 'aligent.braintree.settings.vault_mode.label', + 'required' => false ] ) ->add( 'fraudProtectionAdvanced', CheckboxType::class, [ - 'label' => 'aligent.braintree.settings.fraud_protection_advanced.label' + 'label' => 'aligent.braintree.settings.fraud_protection_advanced.label', + 'required' => false, ] ) ->add( From 593aa469783c397fddb21a7a3cc8a660d0280b36 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Wed, 13 Jul 2022 16:35:53 +0930 Subject: [PATCH 2/4] Add OroCommerce 5.0 Compatibility * Update Composer requirements from 4.2.X to 5.0.X * Remove version number from README * Bump Braintree dependencies to latest stable versions --- README.md | 1 - composer.json | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index eea1976fd..ee0412e69 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ Braintree Payment Gateway Bundle Facts ----- -- version: 4.2.0 - composer name: aligent/braintree-orocommerce Description diff --git a/composer.json b/composer.json index 7e8feb9b8..fa58813de 100644 --- a/composer.json +++ b/composer.json @@ -13,13 +13,13 @@ "psr-4": { "Aligent\\BraintreeBundle\\": "./src/" } }, "require": { - "braintree/braintree_php": "6.4.*", - "php": "~7.4.14 || ~8.0.0", - "oro/commerce": "4.2.*" + "braintree/braintree_php": "6.8.*", + "php": "~8.1.0", + "oro/commerce": "5.0.*" }, "extra": { "npm": { - "braintree-web-drop-in": "1.32.1" + "braintree-web-drop-in": "1.33.2" } } } From 366bf4442b9ca28d6c0cabe5377d185ef55871fd Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Wed, 13 Jul 2022 17:26:17 +0930 Subject: [PATCH 3/4] Fix Configuration Oro 5.0 Compatibility * Switch to new TreeBuilder --- src/DependencyInjection/Configuration.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index d740df9f4..0fc8a450b 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -23,11 +23,10 @@ class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root(AligentBraintreeExtension::ALIAS); + $treeBuilder = new TreeBuilder(AligentBraintreeExtension::ALIAS); SettingsBuilder::append( - $rootNode, + $treeBuilder->getRootNode(), [ 'experimental_payment_methods' => ['type' => 'boolean', 'value' => false] ] From 15d0a0e48c53c7cbf5c7ece5c4a60114470208b4 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Thu, 21 Jul 2022 11:30:13 +0930 Subject: [PATCH 4/4] Bump PHP version for GitHub workflows to 8.1 --- .github/workflows/phpcs.yml | 2 +- .github/workflows/phpstan.yml | 2 +- .github/workflows/unit_tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index b623aaf1f..9fc092922 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.0] + php: [8.1] stability: [prefer-lowest, prefer-stable] name: PHP-${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} - PHPCS diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index c409b8ba9..5453e4db8 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.0] + php: [8.1] stability: [prefer-lowest, prefer-stable] name: PHP-${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} - PHPStan diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 20db6498a..98f17aad0 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.0] + php: [8.1] stability: [prefer-lowest, prefer-stable] name: PHP-${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} - PHPUnit