Skip to content

Commit

Permalink
Remove hard PHP 8.0 requirement
Browse files Browse the repository at this point in the history
This way, s9y still works with PHP 7.4, which makes the upgrade path easier.
  • Loading branch information
onli committed Feb 13, 2024
1 parent 10975a6 commit d8d0e12
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 51 deletions.
2 changes: 0 additions & 2 deletions bundled-libs/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion bundled-libs/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions bundled-libs/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
20 changes: 10 additions & 10 deletions bundled-libs/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
},
Expand Down
10 changes: 5 additions & 5 deletions bundled-libs/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions bundled-libs/composer/platform_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions bundled-libs/psr/simple-cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -19,7 +19,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "1.0.x-dev"
}
}
}
2 changes: 1 addition & 1 deletion bundled-libs/psr/simple-cache/src/CacheException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
/**
* Interface used for all types of exceptions thrown by the implementing library.
*/
interface CacheException extends \Throwable
interface CacheException
{
}
22 changes: 11 additions & 11 deletions bundled-libs/psr/simple-cache/src/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -55,16 +55,16 @@ public function clear();
/**
* Obtains multiple cache items by their unique keys.
*
* @param iterable<string> $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<string, mixed> 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.
Expand All @@ -80,20 +80,20 @@ 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<string> $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.
*
* @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 deleteMultiple(iterable $keys);
public function deleteMultiple($keys);

/**
* Determines whether an item is present in the cache.
Expand All @@ -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);
}
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
}
],
"require": {
"php": "^8.0",
"ext-intl": "*",
"ext-json": "*",
"ext-libxml": "*",
Expand All @@ -50,7 +49,7 @@
"http"
],
"platform": {
"php": "8.0.0"
"php": "7.4"
},
"sort-packages": true,
"vendor-dir": "bundled-libs",
Expand Down
23 changes: 11 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8d0e12

Please sign in to comment.