File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Test with PHP 8.1 and 8.2
6
6
- Made phpspec tests compatible with PSR-7 2.0 strict typing
7
+ - Detect ` null ` and use 0 explicitly to calculate expiration
7
8
8
9
## 1.7.5 - 2022-01-18
9
10
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ private function calculateCacheItemExpiresAfter(?int $maxAge): ?int
230
230
return null ;
231
231
}
232
232
233
- return $ this ->config ['cache_lifetime ' ] + $ maxAge ;
233
+ return ( $ this ->config ['cache_lifetime ' ] ?: 0 ) + $ maxAge ;
234
234
}
235
235
236
236
/**
@@ -368,7 +368,7 @@ private function configureOptions(OptionsResolver $resolver): void
368
368
$ resolver ->setAllowedTypes ('default_ttl ' , ['int ' , 'null ' ]);
369
369
$ resolver ->setAllowedTypes ('respect_cache_headers ' , ['bool ' , 'null ' ]);
370
370
$ resolver ->setAllowedTypes ('methods ' , 'array ' );
371
- $ resolver ->setAllowedTypes ('cache_key_generator ' , ['null ' , ' Http\Client\Common\Plugin\Cache\Generator\ CacheKeyGenerator' ]);
371
+ $ resolver ->setAllowedTypes ('cache_key_generator ' , ['null ' , CacheKeyGenerator::class ]);
372
372
$ resolver ->setAllowedTypes ('blacklisted_paths ' , 'array ' );
373
373
$ resolver ->setAllowedValues ('hash_algo ' , hash_algos ());
374
374
$ resolver ->setAllowedValues ('methods ' , function ($ value ) {
You can’t perform that action at this time.
0 commit comments