Skip to content

Commit 7932a96

Browse files
authored
Merge pull request #56 from flavioheleno/feat/psr-http-message-2x
Add support for psr/http-message 2.x
2 parents 6a8f44d + ecd3afa commit 7932a96

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"require": {
2121
"php": "^7.2 || ^8.0",
22-
"psr/http-message": "^1.0",
22+
"psr/http-message": "^1.1 || ^2.0",
2323
"psr/http-server-middleware": "^1.0"
2424
},
2525
"require-dev": {

src/CacheProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use function gmdate;
1616
use function in_array;
1717
use function is_integer;
18-
use function is_null;
1918
use function strtotime;
2019
use function time;
2120

@@ -43,7 +42,7 @@ public function allowCache(
4342
}
4443
$headerValue = $type;
4544
if ($maxAge || is_integer($maxAge)) {
46-
if (!is_integer($maxAge) && !is_null($maxAge)) {
45+
if (!is_integer($maxAge) && $maxAge !== null) {
4746
$maxAge = strtotime($maxAge) - time();
4847
}
4948
$headerValue = $headerValue.', max-age='.$maxAge;

0 commit comments

Comments
 (0)