From 8ff0615b865e288ebbeb0bc5f203aa6d7977c092 Mon Sep 17 00:00:00 2001 From: Thomas Blanchard <22256904+thomasblanchard-dev@users.noreply.github.com> Date: Mon, 6 Feb 2023 11:43:26 +0100 Subject: [PATCH 1/2] PRevent Fatal Error on server Actually, when update version 2.0 to 2.1 on a PHP 7.0 server, a fatal error occure. The error: `Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.0". You are running 7.0.33-0+deb9u12. in wp-content/plugins/imagify/vendor/composer/platform_check.php on line 24` Wordpress PHP version in the plugin file need to be changed in order to not give the user the right to download the plugin. --- imagify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagify.php b/imagify.php index fff8ae340..4fef9181b 100644 --- a/imagify.php +++ b/imagify.php @@ -5,7 +5,7 @@ * Description: Dramatically reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwidth using Imagify, the new most advanced image optimization tool. * Version: 2.1.1 * Requires at least: 5.3 - * Requires PHP: 7.0 + * Requires PHP: 7.2 * Author: Imagify – Optimize Images & Convert WebP * Author URI: https://imagify.io * Licence: GPLv2 From 5be31c02966d3ec8ff79ffe7bf109c4595a203da Mon Sep 17 00:00:00 2001 From: Thomas Blanchard <22256904+thomasblanchard-dev@users.noreply.github.com> Date: Tue, 7 Mar 2023 09:14:17 +0100 Subject: [PATCH 2/2] fix(composer): change composer php config version --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7c08dcbcf..14ba4ec86 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,10 @@ "dealerdirect/phpcodesniffer-composer-installer": true, "dangoodman/composer-for-wordpress": true, "mnsami/composer-custom-directory-installer": true - } + }, + "platform": { + "php": "7.2" + } }, "support": { "issues": "https://github.com/wp-media/imagify-plugin/issues",