Skip to content

Commit

Permalink
Merge pull request #72 from gsteel/PHP-8.4
Browse files Browse the repository at this point in the history
Add Support for PHP 8.4
  • Loading branch information
gsteel authored Oct 16, 2024
2 parents c4ace0f + 2bf2d32 commit b58dc7a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 44 deletions.
3 changes: 3 additions & 0 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"ignore_php_platform_requirements": {
"8.4": true
},
"backwardCompatibilityCheck": true
}
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"ext-json": "*",
"dflydev/fig-cookies": "^3.0",
"psr/container": "^1.0 || ^2.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-diactoros": "^3.3.0",
"phpunit/phpunit": "^10.5.10",
"laminas/laminas-diactoros": "^3.4.0",
"phpunit/phpunit": "^10.5.36",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.21.1"
"vimeo/psalm": "^5.26.1"
},
"suggest": {
"mezzio/mezzio-csrf": "^1.0 || ^1.0-dev for CSRF protection capabilities",
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
cacheDirectory=".phpunit.cache"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
failOnPhpunitDeprecation="true"
failOnWarning="true"
failOnNotice="true"
failOnDeprecation="true"
>
<source>
<include>
Expand Down
72 changes: 36 additions & 36 deletions test/Persistence/CacheHeadersGeneratorTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ private static function assertEqualDateWithDelta(string $expect, string $actual,

/**
* @return array<string, array{
* cache_expire: int,
* cache_limiter: string,
* expected_expires: string,
* expected_last_modified: string,
* expected_cache_control: string,
* expected_pragma: string,
* cacheExpire: int,
* cacheLimiter: string,
* expectedExpires: string,
* expectedLastModified: string,
* expectedCacheControl: string,
* expectedPragma: string,
* }>
*/
public static function provideCacheLimiterValues(): array
Expand All @@ -266,44 +266,44 @@ public static function provideCacheLimiterValues(): array

return [
'empty' => [
'cache_expire' => $cacheExpire,
'cache_limiter' => '',
'expected_expires' => '',
'expected_last_modified' => '',
'expected_cache_control' => '',
'expected_pragma' => '',
'cacheExpire' => $cacheExpire,
'cacheLimiter' => '',
'expectedExpires' => '',
'expectedLastModified' => '',
'expectedCacheControl' => '',
'expectedPragma' => '',
],
'not-valid' => [
'cache_expire' => $cacheExpire,
'cache_limiter' => 'not-valid',
'expected_expires' => '',
'expected_last_modified' => '',
'expected_cache_control' => '',
'expected_pragma' => '',
'cacheExpire' => $cacheExpire,
'cacheLimiter' => 'not-valid',
'expectedExpires' => '',
'expectedLastModified' => '',
'expectedCacheControl' => '',
'expectedPragma' => '',
],
'nocache' => [
'cache_expire' => $cacheExpire,
'cache_limiter' => 'nocache',
'expected_expires' => Http::CACHE_PAST_DATE,
'expected_last_modified' => '',
'expected_cache_control' => 'no-store, no-cache, must-revalidate',
'expected_pragma' => 'no-cache',
'cacheExpire' => $cacheExpire,
'cacheLimiter' => 'nocache',
'expectedExpires' => Http::CACHE_PAST_DATE,
'expectedLastModified' => '',
'expectedCacheControl' => 'no-store, no-cache, must-revalidate',
'expectedPragma' => 'no-cache',
],
'public' => [
'cache_expire' => $cacheExpire,
'cache_limiter' => 'public',
'expected_expires' => gmdate(Http::DATE_FORMAT, time() + (60 * $cacheExpire)),
'expected_last_modified' => (string) $lastModified,
'expected_cache_control' => 'public, max-age=' . $maxAge,
'expected_pragma' => '',
'cacheExpire' => $cacheExpire,
'cacheLimiter' => 'public',
'expectedExpires' => gmdate(Http::DATE_FORMAT, time() + (60 * $cacheExpire)),
'expectedLastModified' => (string) $lastModified,
'expectedCacheControl' => 'public, max-age=' . $maxAge,
'expectedPragma' => '',
],
'private' => [
'cache_expire' => $cacheExpire,
'cache_limiter' => 'private',
'expected_expires' => Http::CACHE_PAST_DATE,
'expected_last_modified' => (string) $lastModified,
'expected_cache_control' => 'private, max-age=' . $maxAge,
'expected_pragma' => '',
'cacheExpire' => $cacheExpire,
'cacheLimiter' => 'private',
'expectedExpires' => Http::CACHE_PAST_DATE,
'expectedLastModified' => (string) $lastModified,
'expectedCacheControl' => 'private, max-age=' . $maxAge,
'expectedPragma' => '',
],
];
}
Expand Down

0 comments on commit b58dc7a

Please sign in to comment.