From 6973183ee81aa6fe2b5ba9ece82c3267a28674f4 Mon Sep 17 00:00:00 2001 From: Rigel Kent Carbonel Date: Sun, 23 Jan 2022 08:18:31 +0800 Subject: [PATCH 1/4] Add support to laravel 9 --- .github/workflows/test.yml | 13 +++++++------ .phpunit.result.cache | 2 +- composer.json | 14 +++++++++----- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a0ed5a..b3d78ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,13 +12,14 @@ jobs: strategy: matrix: php: [8.0, 8.1] - laravel: [8.*] - dependency-version: [prefer-stable] + laravel: [8.*, 9.*] + stability: [prefer-lowest, prefer-stable] os: [ubuntu-latest, windows-latest] include: - laravel: 8.* - testbench: 6.* - + testbench: ^6.23 + - laravel: 9.* + testbench: 7.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} steps: @@ -33,8 +34,8 @@ jobs: coverage: pcov tools: composer:v2 - - name: Install PHP 8 dependencies - run: composer update --${{ matrix.dependency-version }} --ignore-platform-req=php --no-interaction --no-progress + - name: Install dependencies + run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/pest --coverage --parallel diff --git a/.phpunit.result.cache b/.phpunit.result.cache index b08ff99..85a9186 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_paymaya_payment_method_to_payment_intent":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_create_payment":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_used_more_than_once":3,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_not_valid":3,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_retrieve_a_payment":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_not_retrieve_a_payment_with_invalid_id":3,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_allow_valid_signature":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/BaseModelTest.php::it":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentIntentTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/SourceTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookListCommandTest.php::it":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/AmounToIntegerTest.php::it":3},"times":{"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_without_decimal":0.042,"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_with_in_tenth_decimal":0.002,"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_with_in_hundredth_decimal":0.001,"Luigel\\Paymongo\\Tests\\BaseModelTest::it_can_set_data":0.003,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_create_payment_intent":1.034,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_cannot_create_payment_intent_when_data_is_invalid":0.809,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_cancel_payment_intent":1.694,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_payment_method_to_payment_intent":2.908,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_cannot_attach_payment_intent_with_invalid_data":0.9,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_retrieve_payment_intent":1.774,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_can_create_payment_method":0.966,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_cannot_create_payment_method_with_invalid_data":0.834,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_can_retrieve_payment_method":1.755,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_create_payment":2.189,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_used_more_than_once":2.784,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_not_valid":2.779,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_retrieve_a_payment":2.82,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_not_retrieve_a_payment_with_invalid_id":1.72,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_get_all_payments":1.811,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_not_allow_invalid_signature":0.009,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_allow_valid_signature":0.055,"Luigel\\Paymongo\\Tests\\SourceTest::it_can_create_a_gcash_source":0.875,"Luigel\\Paymongo\\Tests\\SourceTest::it_can_create_a_grab_pay_source":0.857,"Luigel\\Paymongo\\Tests\\TokenTest::it_can_create_token":0.912,"Luigel\\Paymongo\\Tests\\TokenTest::it_cannot_create_token_with_invalid_data":0.855,"Luigel\\Paymongo\\Tests\\TokenTest::it_can_retrieve_token":1.782,"Luigel\\Paymongo\\Tests\\UnauthorizedTest::it_expects_unauthorized_exception_with_invalid_api_keys":0.825,"Luigel\\Paymongo\\Tests\\WebhookTest::it_can_list_all_webhooks":0.849,"Luigel\\Paymongo\\Tests\\WebhookTest::it_can_retrieve_webhook":1.646,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_paymaya_payment_method_to_payment_intent":2.616,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/AmounToIntegerTest.php::it":0.047,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/BaseModelTest.php::it":0.061,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentIntentTest.php::it":2.684,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentTest.php::it":0.741,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymongoValidateSignatureTest.php::it":0.061,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/SourceTest.php::it":0.883,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/TokenTest.php::it":0.815,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/UnauthorizedTest.php::it":1.045,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookTest.php::it":1.714,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookListCommandTest.php::it":1.957}} \ No newline at end of file +{"version":1,"defects":{"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_paymaya_payment_method_to_payment_intent":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_create_payment":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_used_more_than_once":3,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_not_valid":3,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_retrieve_a_payment":4,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_not_retrieve_a_payment_with_invalid_id":3,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_allow_valid_signature":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/BaseModelTest.php::it":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentIntentTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/SourceTest.php::it":3,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookListCommandTest.php::it":4,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/AmounToIntegerTest.php::it":3},"times":{"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_without_decimal":0.042,"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_with_in_tenth_decimal":0.002,"Luigel\\Paymongo\\Tests\\AmounToIntegerTest::it_can_convert_with_in_hundredth_decimal":0.001,"Luigel\\Paymongo\\Tests\\BaseModelTest::it_can_set_data":0.003,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_create_payment_intent":1.034,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_cannot_create_payment_intent_when_data_is_invalid":0.809,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_cancel_payment_intent":1.694,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_payment_method_to_payment_intent":2.908,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_cannot_attach_payment_intent_with_invalid_data":0.9,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_retrieve_payment_intent":1.774,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_can_create_payment_method":0.966,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_cannot_create_payment_method_with_invalid_data":0.834,"Luigel\\Paymongo\\Tests\\PaymentMethodTest::it_can_retrieve_payment_method":1.755,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_create_payment":2.189,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_used_more_than_once":2.784,"Luigel\\Paymongo\\Tests\\PaymentTest::it_cannot_create_payment_when_token_is_not_valid":2.779,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_retrieve_a_payment":2.82,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_not_retrieve_a_payment_with_invalid_id":1.72,"Luigel\\Paymongo\\Tests\\PaymentTest::it_can_get_all_payments":1.811,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_not_allow_invalid_signature":0.009,"Luigel\\Paymongo\\Tests\\PaymongoValidateSignatureTest::it_will_allow_valid_signature":0.055,"Luigel\\Paymongo\\Tests\\SourceTest::it_can_create_a_gcash_source":0.875,"Luigel\\Paymongo\\Tests\\SourceTest::it_can_create_a_grab_pay_source":0.857,"Luigel\\Paymongo\\Tests\\TokenTest::it_can_create_token":0.912,"Luigel\\Paymongo\\Tests\\TokenTest::it_cannot_create_token_with_invalid_data":0.855,"Luigel\\Paymongo\\Tests\\TokenTest::it_can_retrieve_token":1.782,"Luigel\\Paymongo\\Tests\\UnauthorizedTest::it_expects_unauthorized_exception_with_invalid_api_keys":0.825,"Luigel\\Paymongo\\Tests\\WebhookTest::it_can_list_all_webhooks":0.849,"Luigel\\Paymongo\\Tests\\WebhookTest::it_can_retrieve_webhook":1.646,"Luigel\\Paymongo\\Tests\\PaymentIntentTest::it_can_attach_paymaya_payment_method_to_payment_intent":2.616,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/AmounToIntegerTest.php::it":0.047,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/BaseModelTest.php::it":0.061,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentIntentTest.php::it":1.025,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymentTest.php::it":0.741,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/PaymongoValidateSignatureTest.php::it":0.061,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/SourceTest.php::it":0.883,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/TokenTest.php::it":0.815,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/UnauthorizedTest.php::it":1.045,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookTest.php::it":1.714,"\/Users\/luigel\/Projects\/laravel-paymongo\/tests\/WebhookListCommandTest.php::it":1.957}} \ No newline at end of file diff --git a/composer.json b/composer.json index cbc1a01..ef64f24 100644 --- a/composer.json +++ b/composer.json @@ -25,12 +25,12 @@ "require": { "php": "^8.0", "guzzlehttp/guzzle": "^7.0", - "illuminate/support": "^8.0" + "illuminate/support": "^8.0|^9.0" }, "require-dev": { - "orchestra/testbench": "^6.0", + "orchestra/testbench": "^6.0|^7.0", "pestphp/pest": "^1.20", - "pestphp/pest-plugin-parallel": "^0.3.1" + "pestphp/pest-plugin-parallel": "^1.0" }, "autoload": { "psr-4": { @@ -48,7 +48,10 @@ }, "config": { "sort-packages": true, - "discard-changes": true + "discard-changes": true, + "allow-plugins": { + "pestphp/pest-plugin": true + } }, "extra": { "laravel": { @@ -59,5 +62,6 @@ "Paymongo": "Luigel\\Paymongo\\Facades\\Paymongo" } } - } + }, + "minimum-stability": "dev" } From 6c573558a44869c8e2676b47fcd639b416395961 Mon Sep 17 00:00:00 2001 From: Rigel Kent Carbonel Date: Sun, 23 Jan 2022 08:26:22 +0800 Subject: [PATCH 2/4] Add support to laravel 9 --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3d78ed..0c5fd7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,6 @@ jobs: php: [8.0, 8.1] laravel: [8.*, 9.*] stability: [prefer-lowest, prefer-stable] - os: [ubuntu-latest, windows-latest] include: - laravel: 8.* testbench: ^6.23 @@ -34,8 +33,10 @@ jobs: coverage: pcov tools: composer:v2 - - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/pest --coverage --parallel From f54b0ce800e83335690b1a013bc494926bf7f624 Mon Sep 17 00:00:00 2001 From: Rigel Kent Carbonel Date: Sun, 23 Jan 2022 08:29:17 +0800 Subject: [PATCH 3/4] Add support to laravel 9 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c5fd7d..ae7faaf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: + os: [ubuntu-latest] php: [8.0, 8.1] laravel: [8.*, 9.*] stability: [prefer-lowest, prefer-stable] From 4eac19dcb8a466339472d6f0b1602d899b21d458 Mon Sep 17 00:00:00 2001 From: Rigel Kent Carbonel Date: Sun, 23 Jan 2022 08:31:41 +0800 Subject: [PATCH 4/4] Add support to laravel 9 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae7faaf..cdf19dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ jobs: php-tests: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest] php: [8.0, 8.1]