From 04fe9ef8988289b02e4983321f377a2bb8de4499 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 22 Nov 2025 13:52:22 +0100 Subject: [PATCH] Fix PHP 8.5 deprecation `imagedestroy` is a no-op on PHP 8.0+ due to the migration to objects and is deprecated as of PHP 8.5. --- tests/Basic/ScreenshotTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Basic/ScreenshotTest.php b/tests/Basic/ScreenshotTest.php index e2d3e10..c0cc34a 100644 --- a/tests/Basic/ScreenshotTest.php +++ b/tests/Basic/ScreenshotTest.php @@ -25,6 +25,8 @@ public function testScreenshot(): void $this->fail('The screenshot should be a valid image'); } - imagedestroy($img); + if (\PHP_VERSION_ID < 80000) { + imagedestroy($img); + } } }