diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2f758f9..f86449e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,8 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" + - "8.5" operating-system: [ubuntu-latest, windows-latest] steps: @@ -46,7 +48,7 @@ jobs: extensions: "mbstring, gd, bcmath, bz2" tools: composer:v2 ini-values: error_reporting=-1 - + - name: "Install dependencies" run: "composer install --no-interaction --no-progress" diff --git a/composer.json b/composer.json index 4e372da..fb4a16f 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "require-dev": { "yoast/phpunit-polyfills": "^1.0", - "mockery/mockery": "^0.9.5", + "mockery/mockery": "^0.9.5 || ^1.0", "squizlabs/php_codesniffer": "^3.4", "tracy/tracy": "^2.5" }, diff --git a/src/Output/Png.php b/src/Output/Png.php index 5cdaebd..1ea004f 100644 --- a/src/Output/Png.php +++ b/src/Output/Png.php @@ -57,7 +57,10 @@ public function output(QrCode $qrCode, $w = 100, $background = [255, 255, 255], $data = ob_get_contents(); ob_end_clean(); - imagedestroy($im); + //This function has been DEPRECATED as of PHP 8.5.0 + if (PHP_VERSION_ID < 80500) { + imagedestroy($im); + } return $data; }