You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#46769 [HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache (mpdude)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
PHP 8.1 may trigger a deprecation notice `PHP Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in .../symfony/http-kernel/HttpCache/HttpCache.php on line 721`
The reason is that `$entry->getTtl()` may return `null` for cache entries where no freshness information is present.
I think we would err on the safe side by not using stale-while-revalidate behaviour in this case.
Commits
-------
d0955c2 [HttpKernel] Fix a PHP 8.1 deprecation notice in HttpCache
0 commit comments