Skip to content

Commit 9e804c0

Browse files
authored
Update PHP and firebase/php-jwt version requirements (#229)
Update PHP and firebase/php-jwt version requirements
2 parents 20f04c1 + 4893c92 commit 9e804c0

6 files changed

Lines changed: 18 additions & 15 deletions

File tree

.github/workflows/psalm.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
name: Psalm
22

3-
# Controls when the action will run.
43
on: [push, pull_request]
54

6-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
75
jobs:
8-
# This workflow contains a single job called "build"
9-
build:
10-
# The type of runner that the job will run on
6+
psalm:
117
runs-on: ubuntu-latest
128

13-
# Steps represent a sequence of tasks that will be executed as part of the job
149
steps:
15-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
1610
- uses: actions/checkout@v3
1711

18-
- name: Psalm – Static Analysis for PHP
19-
uses: docker://vimeo/psalm-github-actions:4.18.1
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.0'
16+
extensions: curl, json
17+
tools: composer:v2
18+
19+
- name: Install dependencies
20+
run: composer install --no-progress
21+
22+
- name: Run Psalm
23+
run: vendor/bin/psalm --no-progress

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
14+
php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
1515
stability: [ prefer-stable ]
1616

1717
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Requirements
1111

1212
- [Sign up](https://www.messagebird.com/en/signup) for a free MessageBird account
1313
- Create a new access_key in the developers sections
14-
- MessageBird API client for PHP requires PHP >= 7.3.
14+
- MessageBird API client for PHP requires PHP >= 8.0.
1515

1616
Installation
1717
-----

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"source": "https://github.com/messagebird/php-rest-api"
1717
},
1818
"require": {
19-
"php": ">=7.3|~8.0.0|~8.1.0|~8.2.0",
19+
"php": ">=8.0",
2020
"ext-curl": "*",
2121
"ext-json": "*",
22-
"firebase/php-jwt": "^5.5.1|^6.2"
22+
"firebase/php-jwt": "^7.0"
2323
},
2424
"require-dev": {
2525
"phpunit/phpunit": "^9.5.14",

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="7"
4+
phpVersion="8.0"
45
resolveFromConfigFile="true"
56
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
67
xmlns="https://getpsalm.org/schema/config"

src/MessageBird/Common/HttpClient.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ public function performHttpRequest(string $method, ?string $resourceName, $query
199199
$isThreePartResponse = (strpos($parts[0], "\n") === false && strpos($parts[0], 'HTTP/1.') === 0);
200200
[$responseHeader, $responseBody] = $isThreePartResponse ? [$parts[1], $parts[2]] : [$parts[0], $parts[1]];
201201

202-
curl_close($curl);
203-
204202
return [$responseStatus, $responseHeader, $responseBody];
205203
}
206204

0 commit comments

Comments
 (0)