From 1beedd9ca15d54a82fccf6ce5284ac131fbe4645 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Mon, 1 Dec 2025 08:23:17 +0100 Subject: [PATCH] Use canonical cast name to avoid deprecation notice on PHP >= 8.5 --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 7c32e5a3c5..b8115d00a7 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -223,7 +223,7 @@ protected function pScalar_DNumber(Scalar\DNumber $node) { // Try to find a short full-precision representation $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (double) $stringValue) { + if ($node->value !== (float) $stringValue) { $stringValue = sprintf('%.17G', $node->value); }