From 053dc2bea5bdb687eeb952108392f6323a36a9a9 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sat, 7 Dec 2024 14:31:24 +0000 Subject: [PATCH] ignore PHPStan errors for PHP 7.4 compatability --- .phpstan.neon | 6 ++++++ src/Object/Image.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.phpstan.neon b/.phpstan.neon index 28df3dbcc4..de35beae92 100644 --- a/.phpstan.neon +++ b/.phpstan.neon @@ -23,3 +23,9 @@ parameters: dynamicConstantNames: - DB_UPDATE_VERSION + + ignoreErrors: + - + # Ignore missing GdImage class in PHP 7.4 + message: '(^Property .+ has unknown class GdImage as its type\.$)' + path: src diff --git a/src/Object/Image.php b/src/Object/Image.php index 2f172df58c..43b6d91607 100644 --- a/src/Object/Image.php +++ b/src/Object/Image.php @@ -13,6 +13,7 @@ use Friendica\Util\Images; use Imagick; use ImagickDraw; use ImagickPixel; +use GdImage; use kornrunner\Blurhash\Blurhash; /** @@ -20,7 +21,7 @@ use kornrunner\Blurhash\Blurhash; */ class Image { - /** @var Imagick|resource */ + /** @var GdImage|Imagick|resource */ private $image; /*