From f792a00264763bebcf6e57503f90373cf02ad7ce Mon Sep 17 00:00:00 2001 From: Vaibhav Chopra Date: Sun, 10 May 2026 20:51:14 +0530 Subject: [PATCH 1/3] chore: upgrade PHP 8.1+ and dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PHP: >=7.3 → >=8.1 - phpunit: ^9 → ^10.5 - raveren/kint: 1.* → ^5.0 - CI: test PHP 8.1, 8.2, 8.3, 8.4 - GitHub Actions: v2 → v4 Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 18 +++++++++++------- composer.json | 6 +++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 869955d8..f0444b5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,29 +9,33 @@ on: branches: - master jobs: - run: + test: runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['8.1', '8.2', '8.3', '8.4'] steps: - name: Checkout - uses: actions/checkout@v2 - - name: Set up php 8.0 + uses: actions/checkout@v4 + - name: Set up PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: ${{ matrix.php-version }} + coverage: xdebug - name: 'Create env file' run: | touch ${{ github.workspace }}/tests/.env echo RAZORPAY_API_KEY=${{ secrets.RAZORPAY_API_KEY }} >> ${{ github.workspace }}/tests/.env echo RAZORPAY_API_SECRET=${{ secrets.RAZORPAY_API_SECRET }} >> ${{ github.workspace }}/tests/.env - cat ${{ github.workspace }}/tests/.env - name: Install dependencies run: composer self-update && composer install && composer require vlucas/phpdotenv && composer dump-autoload - name: Run tests and collect coverage - run: vendor/bin/phpunit ./tests/CoverageTest.php --coverage-clover coverage.xml . + run: vendor/bin/phpunit ./tests/CoverageTest.php --coverage-clover coverage.xml env: RAZORPAY_API_KEY: ${{ secrets.RAZORPAY_API_KEY }} RAZORPAY_API_SECRET: ${{ secrets.RAZORPAY_API_SECRET }} RAZORPAY_PARTNER_API_KEY: ${{ secrets.RAZORPAY_PARTNER_API_KEY }} RAZORPAY_PARTNER_API_SECRET: ${{ secrets.RAZORPAY_PARTNER_API_SECRET }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + if: matrix.php-version == '8.4' + uses: codecov/codecov-action@v4 diff --git a/composer.json b/composer.json index 2ce0f7dd..70b9d0ab 100644 --- a/composer.json +++ b/composer.json @@ -23,13 +23,13 @@ "homepage": "https://docs.razorpay.com", "license": "MIT", "require": { - "php": ">=7.3", + "php": ">=8.1", "rmccue/requests": "^2.0", "ext-json": "*" }, "require-dev": { - "raveren/kint": "1.*", - "phpunit/phpunit": "^9" + "raveren/kint": "^5.0", + "phpunit/phpunit": "^10.5" }, "autoload": { "psr-4": { From ee49836321ce0167c01c31e903a44c88f1887a8f Mon Sep 17 00:00:00 2001 From: Vaibhav Chopra Date: Wed, 13 May 2026 12:27:45 +0530 Subject: [PATCH 2/3] Fix PHP version and kint package name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Min PHP: 8.1 → 8.2 (8.1 is EOL Dec 2025) - Test matrix: 8.2, 8.3, 8.4, 8.5 - Fix kint package: raveren/kint → kint-php/kint (correct package name) Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yml | 4 ++-- composer.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0444b5e..5dad7ecf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1', '8.2', '8.3', '8.4'] + php-version: ['8.2', '8.3', '8.4', '8.5'] steps: - name: Checkout uses: actions/checkout@v4 @@ -37,5 +37,5 @@ jobs: RAZORPAY_PARTNER_API_KEY: ${{ secrets.RAZORPAY_PARTNER_API_KEY }} RAZORPAY_PARTNER_API_SECRET: ${{ secrets.RAZORPAY_PARTNER_API_SECRET }} - name: Upload coverage to Codecov - if: matrix.php-version == '8.4' + if: matrix.php-version == '8.5' uses: codecov/codecov-action@v4 diff --git a/composer.json b/composer.json index 70b9d0ab..f8a055dc 100644 --- a/composer.json +++ b/composer.json @@ -23,12 +23,12 @@ "homepage": "https://docs.razorpay.com", "license": "MIT", "require": { - "php": ">=8.1", + "php": ">=8.2", "rmccue/requests": "^2.0", "ext-json": "*" }, "require-dev": { - "raveren/kint": "^5.0", + "kint-php/kint": "^5.0", "phpunit/phpunit": "^10.5" }, "autoload": { From ca1a2f94bc99e884a5bfd3b0ce363aea39cea8ca Mon Sep 17 00:00:00 2001 From: Vaibhav Chopra Date: Wed, 13 May 2026 12:30:12 +0530 Subject: [PATCH 3/3] Use PHPUnit 9.6 instead of 10.5 PHPUnit 10 changed TestCase constructor signature, which breaks existing tests that instantiate test classes directly. PHPUnit 9.6 supports PHP 8.x. Co-Authored-By: Claude Opus 4.7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f8a055dc..5a2aca83 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "require-dev": { "kint-php/kint": "^5.0", - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^9.6" }, "autoload": { "psr-4": {