From db2d85a5ea222d2fde6f2da0c1f5e233134fa205 Mon Sep 17 00:00:00 2001 From: Sergio Brighenti Date: Wed, 27 Dec 2023 12:39:46 +0100 Subject: [PATCH] fix test failure --- composer.json | 2 +- src/Drivers/Imagick/ImagickText.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4f5d40a..f975df8 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.13", "sapientpro/image-comparator": "^1.0", - "pestphp/pest": "^2.17" + "pestphp/pest": "^2.29" }, "autoload": { "psr-4": { diff --git a/src/Drivers/Imagick/ImagickText.php b/src/Drivers/Imagick/ImagickText.php index 507fdaf..d7104bc 100644 --- a/src/Drivers/Imagick/ImagickText.php +++ b/src/Drivers/Imagick/ImagickText.php @@ -25,7 +25,9 @@ public function getBox(): Box $draw->setFontSize($this->size); $draw->setTextKerning($this->kerning); $draw->setGravity($this->align->toImagickGravity()); - $draw->setStrokeWidth($this->stroke); + if ($this->stroke !== null) { + $draw->setStrokeWidth($this->stroke); + } $draw->setStrokeAntialias(false); $draw->setStrokeOpacity(1); $draw->setFillOpacity(1);