diff --git a/src/Components/Health/Checker/PerformanceChecker/AbstractCompressionChecker.php b/src/Components/Health/Checker/PerformanceChecker/AbstractCompressionChecker.php new file mode 100644 index 0000000..355346e --- /dev/null +++ b/src/Components/Health/Checker/PerformanceChecker/AbstractCompressionChecker.php @@ -0,0 +1,68 @@ +shopwareVersion, '>')) { + return; + } + + if (!$this->enabled) { + $collection->add( + SettingsResult::warning( + strtolower($this->functionality) . '-compress', + $this->functionality . ' compression', + 'disabled', + 'enabled', + self::DOCUMENTATION_URL, + ), + ); + + return; + } + + if ($this->method === 'gzip') { + $collection->add( + SettingsResult::warning( + strtolower($this->functionality) . '-compression-method', + $this->functionality . ' compression method', + 'gzip', + 'zstd', + self::DOCUMENTATION_URL, + ), + ); + + return; + } + + if ($this->method === 'zstd' && !extension_loaded('zstd')) { + $collection->add( + SettingsResult::error( + $this->functionality . '-compression-method-extension-zstd', + 'PHP extension zstd for ' . $this->functionality . ' compression method', + 'disabled', + 'enabled', + self::DOCUMENTATION_URL, + ), + ); + } + } +} diff --git a/src/Components/Health/Checker/PerformanceChecker/CacheCompressionChecker.php b/src/Components/Health/Checker/PerformanceChecker/CacheCompressionChecker.php new file mode 100644 index 0000000..7f8cc05 --- /dev/null +++ b/src/Components/Health/Checker/PerformanceChecker/CacheCompressionChecker.php @@ -0,0 +1,23 @@ +