From 8c18273741f1192c2a32a97041ad6bfdae5f74e7 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Wed, 18 Feb 2026 10:09:47 +0100 Subject: [PATCH 1/4] Update firebase/php-jwt version requirements Only allow firebase/php-jwt to resolve GHSA-2x45-7fc3-mxwq. Also drop duplicate version constraints for PHP (>=7.2 is also valid for any PHP 8 or later versions). --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c6dc322..49e52c3 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,10 @@ "source": "https://github.com/messagebird/php-rest-api" }, "require": { - "php": ">=7.3|~8.0.0|~8.1.0|~8.2.0", + "php": ">=7.3", "ext-curl": "*", "ext-json": "*", - "firebase/php-jwt": "^5.5.1|^6.2" + "firebase/php-jwt": "^7.0" }, "require-dev": { "phpunit/phpunit": "^9.5.14", From a06fbbe7f4b2b70832c7bdc3408eaa2a0a8f22e1 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Wed, 18 Feb 2026 10:19:24 +0100 Subject: [PATCH 2/4] Bump PHP to >=8.0 due to dependency constraint Also, support for PHP 7 has been discontinued since 03 Nov 2022. --- README.md | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2aa7f8e..55c8634 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Requirements - [Sign up](https://www.messagebird.com/en/signup) for a free MessageBird account - Create a new access_key in the developers sections -- MessageBird API client for PHP requires PHP >= 7.3. +- MessageBird API client for PHP requires PHP >= 8.0. Installation ----- diff --git a/composer.json b/composer.json index 49e52c3..714f4e2 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "source": "https://github.com/messagebird/php-rest-api" }, "require": { - "php": ">=7.3", + "php": ">=8.0", "ext-curl": "*", "ext-json": "*", "firebase/php-jwt": "^7.0" From 0e88635c2dc687d0530fb186aec399e1601a1f7a Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Wed, 18 Feb 2026 11:07:45 +0100 Subject: [PATCH 3/4] Remove curl_close call (no-op since PHP 8) --- src/MessageBird/Common/HttpClient.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/MessageBird/Common/HttpClient.php b/src/MessageBird/Common/HttpClient.php index 0daf570..4e9b9e1 100644 --- a/src/MessageBird/Common/HttpClient.php +++ b/src/MessageBird/Common/HttpClient.php @@ -199,8 +199,6 @@ public function performHttpRequest(string $method, ?string $resourceName, $query $isThreePartResponse = (strpos($parts[0], "\n") === false && strpos($parts[0], 'HTTP/1.') === 0); [$responseHeader, $responseBody] = $isThreePartResponse ? [$parts[1], $parts[2]] : [$parts[0], $parts[1]]; - curl_close($curl); - return [$responseStatus, $responseHeader, $responseBody]; } From 4893c92b38ec172c3433e6928d83cdb7171c41bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Feiner?= Date: Thu, 19 Feb 2026 15:05:17 +0100 Subject: [PATCH 4/4] Fix CI for PHP 8.0+ minimum version - Replace Docker-based Psalm action (bundles PHP 7.4) with setup-php - Drop PHP 7.4 from test matrix - Set phpVersion in psalm.xml for PHP 8.0+ analysis Co-Authored-By: Claude Opus 4.6 --- .github/workflows/psalm.yml | 22 +++++++++++++--------- .github/workflows/tests.yml | 2 +- psalm.xml | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index a93f882..27a7cf7 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -1,19 +1,23 @@ name: Psalm -# Controls when the action will run. on: [push, pull_request] -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on + psalm: runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - name: Psalm – Static Analysis for PHP - uses: docker://vimeo/psalm-github-actions:4.18.1 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + extensions: curl, json + tools: composer:v2 + + - name: Install dependencies + run: composer install --no-progress + + - name: Run Psalm + run: vendor/bin/psalm --no-progress diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3fc0437..7641218 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: true matrix: - php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] + php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] stability: [ prefer-stable ] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} diff --git a/psalm.xml b/psalm.xml index 7c0333d..42f29c4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,7 @@