From d8d0e12c1f022fa532c49d1ed741ac282f4dc1b5 Mon Sep 17 00:00:00 2001 From: onli Date: Tue, 13 Feb 2024 19:18:36 +0100 Subject: [PATCH] Remove hard PHP 8.0 requirement This way, s9y still works with PHP 7.4, which makes the upgrade path easier. --- bundled-libs/composer/autoload_classmap.php | 2 -- bundled-libs/composer/autoload_real.php | 2 +- bundled-libs/composer/autoload_static.php | 2 -- bundled-libs/composer/installed.json | 20 ++++++++-------- bundled-libs/composer/installed.php | 10 ++++---- bundled-libs/composer/platform_check.php | 4 ++-- bundled-libs/psr/simple-cache/composer.json | 6 ++--- .../psr/simple-cache/src/CacheException.php | 2 +- .../psr/simple-cache/src/CacheInterface.php | 22 +++++++++--------- composer.json | 3 +-- composer.lock | 23 +++++++++---------- 11 files changed, 45 insertions(+), 51 deletions(-) diff --git a/bundled-libs/composer/autoload_classmap.php b/bundled-libs/composer/autoload_classmap.php index bea0f0529..69064d536 100644 --- a/bundled-libs/composer/autoload_classmap.php +++ b/bundled-libs/composer/autoload_classmap.php @@ -119,9 +119,7 @@ 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', 'Psr\\SimpleCache\\CacheException' => $vendorDir . '/psr/simple-cache/src/CacheException.php', 'Psr\\SimpleCache\\CacheInterface' => $vendorDir . '/psr/simple-cache/src/CacheInterface.php', 'Psr\\SimpleCache\\InvalidArgumentException' => $vendorDir . '/psr/simple-cache/src/InvalidArgumentException.php', diff --git a/bundled-libs/composer/autoload_real.php b/bundled-libs/composer/autoload_real.php index 92b12ce69..a929208f0 100644 --- a/bundled-libs/composer/autoload_real.php +++ b/bundled-libs/composer/autoload_real.php @@ -35,7 +35,7 @@ public static function getLoader() require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInitcbda25b16bb8365467298ce193f0f30c::getInitializer($loader)); - $loader->setApcuPrefix('Z/MU3fsy9VaX7GThuDWyc'); + $loader->setApcuPrefix('pZXHgfsNRpI3/XO56IexP'); $loader->register(true); $filesToLoad = \Composer\Autoload\ComposerStaticInitcbda25b16bb8365467298ce193f0f30c::$files; diff --git a/bundled-libs/composer/autoload_static.php b/bundled-libs/composer/autoload_static.php index 27c6e3f88..e47a0cdcf 100644 --- a/bundled-libs/composer/autoload_static.php +++ b/bundled-libs/composer/autoload_static.php @@ -176,9 +176,7 @@ class ComposerStaticInitcbda25b16bb8365467298ce193f0f30c 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', - 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', - 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', 'Psr\\SimpleCache\\CacheException' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheException.php', 'Psr\\SimpleCache\\CacheInterface' => __DIR__ . '/..' . '/psr/simple-cache/src/CacheInterface.php', 'Psr\\SimpleCache\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/simple-cache/src/InvalidArgumentException.php', diff --git a/bundled-libs/composer/installed.json b/bundled-libs/composer/installed.json index 7c390d3d9..8dcea3600 100644 --- a/bundled-libs/composer/installed.json +++ b/bundled-libs/composer/installed.json @@ -408,27 +408,27 @@ }, { "name": "psr/simple-cache", - "version": "2.0.0", - "version_normalized": "2.0.0.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, - "time": "2021-10-29T13:22:09+00:00", + "time": "2017-10-23T01:57:42+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "dist", @@ -444,7 +444,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -456,7 +456,7 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/master" }, "install-path": "../psr/simple-cache" }, diff --git a/bundled-libs/composer/installed.php b/bundled-libs/composer/installed.php index cbd6997d2..41ab50020 100644 --- a/bundled-libs/composer/installed.php +++ b/bundled-libs/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 's9y/serendipity', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ad77cf9432dbef23b9bc6c91797dc3bfb14f9c95', + 'reference' => '10975a6127469bfdcb209dfae278f36e129c36e2', 'type' => 's9y-core', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -74,9 +74,9 @@ 'dev_requirement' => false, ), 'psr/simple-cache' => array( - 'pretty_version' => '2.0.0', - 'version' => '2.0.0.0', - 'reference' => '8707bf3cea6f710bf6ef05491234e3ab06f6432a', + 'pretty_version' => '1.0.1', + 'version' => '1.0.1.0', + 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), @@ -91,7 +91,7 @@ 's9y/serendipity' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ad77cf9432dbef23b9bc6c91797dc3bfb14f9c95', + 'reference' => '10975a6127469bfdcb209dfae278f36e129c36e2', 'type' => 's9y-core', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/bundled-libs/composer/platform_check.php b/bundled-libs/composer/platform_check.php index adfb472fb..6d3407dbb 100644 --- a/bundled-libs/composer/platform_check.php +++ b/bundled-libs/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80000)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.0". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 70100)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/bundled-libs/psr/simple-cache/composer.json b/bundled-libs/psr/simple-cache/composer.json index a520e7d57..2978fa559 100644 --- a/bundled-libs/psr/simple-cache/composer.json +++ b/bundled-libs/psr/simple-cache/composer.json @@ -6,11 +6,11 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "autoload": { "psr-4": { @@ -19,7 +19,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } } } diff --git a/bundled-libs/psr/simple-cache/src/CacheException.php b/bundled-libs/psr/simple-cache/src/CacheException.php index f61b24c2b..eba53815c 100644 --- a/bundled-libs/psr/simple-cache/src/CacheException.php +++ b/bundled-libs/psr/simple-cache/src/CacheException.php @@ -5,6 +5,6 @@ /** * Interface used for all types of exceptions thrown by the implementing library. */ -interface CacheException extends \Throwable +interface CacheException { } diff --git a/bundled-libs/psr/simple-cache/src/CacheInterface.php b/bundled-libs/psr/simple-cache/src/CacheInterface.php index cb05d2f1d..99e8d9574 100644 --- a/bundled-libs/psr/simple-cache/src/CacheInterface.php +++ b/bundled-libs/psr/simple-cache/src/CacheInterface.php @@ -15,7 +15,7 @@ interface CacheInterface * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function get(string $key, mixed $default = null); + public function get($key, $default = null); /** * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. @@ -31,7 +31,7 @@ public function get(string $key, mixed $default = null); * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null); + public function set($key, $value, $ttl = null); /** * Delete an item from the cache by its unique key. @@ -43,7 +43,7 @@ public function set(string $key, mixed $value, null|int|\DateInterval $ttl = nul * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function delete(string $key); + public function delete($key); /** * Wipes clean the entire cache's keys. @@ -55,16 +55,16 @@ public function clear(); /** * Obtains multiple cache items by their unique keys. * - * @param iterable $keys A list of keys that can be obtained in a single operation. - * @param mixed $default Default value to return for keys that do not exist. + * @param iterable $keys A list of keys that can obtained in a single operation. + * @param mixed $default Default value to return for keys that do not exist. * - * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. + * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. * * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ - public function getMultiple(iterable $keys, mixed $default = null); + public function getMultiple($keys, $default = null); /** * Persists a set of key => value pairs in the cache, with an optional TTL. @@ -80,12 +80,12 @@ public function getMultiple(iterable $keys, mixed $default = null); * MUST be thrown if $values is neither an array nor a Traversable, * or if any of the $values are not a legal value. */ - public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null); + public function setMultiple($values, $ttl = null); /** * Deletes multiple cache items in a single operation. * - * @param iterable $keys A list of string-based keys to be deleted. + * @param iterable $keys A list of string-based keys to be deleted. * * @return bool True if the items were successfully removed. False if there was an error. * @@ -93,7 +93,7 @@ public function setMultiple(iterable $values, null|int|\DateInterval $ttl = null * MUST be thrown if $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ - public function deleteMultiple(iterable $keys); + public function deleteMultiple($keys); /** * Determines whether an item is present in the cache. @@ -110,5 +110,5 @@ public function deleteMultiple(iterable $keys); * @throws \Psr\SimpleCache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ - public function has(string $key); + public function has($key); } diff --git a/composer.json b/composer.json index 436388fbc..f21d5df3a 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,6 @@ } ], "require": { - "php": "^8.0", "ext-intl": "*", "ext-json": "*", "ext-libxml": "*", @@ -50,7 +49,7 @@ "http" ], "platform": { - "php": "8.0.0" + "php": "7.4" }, "sort-packages": true, "vendor-dir": "bundled-libs", diff --git a/composer.lock b/composer.lock index f3cc0ed49..20ee9328c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "277f2c7ec3cf27f5f0de662b93481792", + "content-hash": "ed393f6ea172968b5795b80a35b344ec", "packages": [ { "name": "katzgrau/klogger", @@ -393,25 +393,25 @@ }, { "name": "psr/simple-cache", - "version": "2.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a" + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/8707bf3cea6f710bf6ef05491234e3ab06f6432a", - "reference": "8707bf3cea6f710bf6ef05491234e3ab06f6432a", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -426,7 +426,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -438,9 +438,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/2.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/master" }, - "time": "2021-10-29T13:22:09+00:00" + "time": "2017-10-23T01:57:42+00:00" }, { "name": "smarty/smarty", @@ -593,7 +593,6 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.0", "ext-intl": "*", "ext-json": "*", "ext-libxml": "*", @@ -604,7 +603,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "8.0.0" + "php": "7.4" }, "plugin-api-version": "2.6.0" }