Skip to content

Commit 52b074d

Browse files
authored
compatibility with PHP 7.1 (#53)
* compatibility with PHP 7.1 * use SF 4.4 * fix tests * changelog * uniformize version constraints
1 parent b4a00c0 commit 52b074d

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ jobs:
4242
key: "php-${{ matrix.php-version }}-${{ matrix.operating-system }}"
4343
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.operating-system }}"
4444

45-
- name: "removing 'lcobucci/jwt' dependency"
46-
if: ${{ matrix.php-version != '7.4' && matrix.php-version != '8.0' }}
47-
run: "composer remove --no-update --dev lcobucci/jwt"
48-
4945
- name: "installing lowest dependencies"
5046
if: ${{ matrix.dependencies == 'lowest' }}
5147
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
0.5.3
5+
-----
6+
7+
* Full compatibility with PHP 7.1+
8+
49
0.5.2
510
-----
611

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
],
1818
"require": {
1919
"php": ">=7.1.3",
20-
"symfony/http-client": "^4.3.5|^5.0",
21-
"symfony/http-foundation": "^4.0|^5.0",
22-
"symfony/web-link": "^4.0|^5.0",
20+
"symfony/http-client": "^4.4|^5.0",
21+
"symfony/http-foundation": "^4.4|^5.0",
22+
"symfony/web-link": "^4.4|^5.0",
2323
"symfony/deprecation-contracts": "^2.0"
2424
},
2525
"autoload": {
@@ -44,9 +44,9 @@
4444
"symfony/stopwatch": "Integration with the profiler performances"
4545
},
4646
"require-dev": {
47-
"lcobucci/jwt": "^4.0",
48-
"symfony/phpunit-bridge": "^4.2.4|^5.0",
49-
"symfony/stopwatch": "^4.3|^5.0"
47+
"lcobucci/jwt": "^3.4|^4.0",
48+
"symfony/phpunit-bridge": "^4.4|^5.0",
49+
"symfony/stopwatch": "^4.4|^5.0"
5050
},
5151
"minimum-stability": "dev"
5252
}

tests/AuthorizationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ function (Update $u): string { return 'dummy'; },
4646

4747
$payload = json_decode(base64_decode(explode('.', $cookie->getValue())[1], true), true);
4848
$this->assertArrayHasKey('exp', $payload);
49-
$this->assertIsFloat($payload['exp']);
49+
$this->assertIsNumeric($payload['exp']);
5050
}
5151
}

tests/Jwt/FactoryTokenProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class FactoryTokenProviderTest extends TestCase
2323
public function testGetToken(): void
2424
{
2525
if (!class_exists(Key\InMemory::class)) {
26-
$this->markTestSkipped('requires lcobucci/jwt:^4.0.');
26+
$this->markTestSkipped('requires lcobucci/jwt.');
2727
}
2828

2929
$factory = new LcobucciFactory('!ChangeMe!', 'hmac.sha256', null);

tests/Jwt/LcobucciFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class LcobucciFactoryTest extends TestCase
2323
protected function setUp(): void
2424
{
2525
if (!class_exists(Key\InMemory::class)) {
26-
$this->markTestSkipped('requires lcobucci/jwt:^4.0.');
26+
$this->markTestSkipped('requires lcobucci/jwt.');
2727
}
2828
}
2929

0 commit comments

Comments
 (0)