Description
PHP 8.4 deprecated the (double) cast in favor of (float). This triggers a deprecation warning in production:
Non-canonical cast (double) is deprecated, use the (float) cast instead
in vendor/ratchet/rfc6455/src/Handshake/RequestVerifier.php on line 48
Location
src/Handshake/RequestVerifier.php, line 48:
public function verifyHTTPVersion($val): bool {
return 1.1 <= (double)$val;
}
Fix
Replace (double) with (float):
public function verifyHTTPVersion($val): bool {
return 1.1 <= (float)$val;
}
Reference
Description
PHP 8.4 deprecated the
(double)cast in favor of(float). This triggers a deprecation warning in production:Location
src/Handshake/RequestVerifier.php, line 48:Fix
Replace
(double)with(float):Reference
(double)and(real)are non-canonical aliases for(float)and will be removed in a future PHP version