diff --git a/composer.json b/composer.json index 0ac4420..0ebdf71 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ "colinmollenhour/credis": "^1.13", "twig/twig": "^3.0", "mustache/mustache": "^2.0", - "smarty/smarty": "^3.0" + "smarty/smarty": "^3.0", + "phpfastcache/phpfastcache": "^7.0" } } diff --git a/composer.lock b/composer.lock index 2230ad2..df2fb19 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": "7f672103460572d4ac75a680dec2a9b5", + "content-hash": "6ad3f58bc7ff15a981d266fa9439abc4", "packages": [ { "name": "colinmollenhour/credis", @@ -99,6 +99,210 @@ ], "time": "2022-01-21T06:08:36+00:00" }, + { + "name": "phpfastcache/phpfastcache", + "version": "7.1.2", + "source": { + "type": "git", + "url": "https://github.com/PHPSocialNetwork/phpfastcache.git", + "reference": "ee5e7fc730aeef7b0e0970adc038168b4087601c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPSocialNetwork/phpfastcache/zipball/ee5e7fc730aeef7b0e0970adc038168b4087601c", + "reference": "ee5e7fc730aeef7b0e0970adc038168b4087601c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=7.0", + "psr/cache": "~1.0.0", + "psr/simple-cache": "~1.0.0" + }, + "conflict": { + "basho/riak": "*", + "doctrine/couchdb": "*" + }, + "suggest": { + "ext-apc": "*", + "ext-couchbase": "*", + "ext-intl": "*", + "ext-leveldb": "*", + "ext-memcache": "*", + "ext-memcached": "*", + "ext-redis": "*", + "ext-sqlite": "*", + "ext-wincache": "*", + "ext-xcache": "*", + "mongodb/mongodb": "^1.1", + "phpfastcache/couchdb": "~1.0.0", + "phpfastcache/phpssdb": "~1.0.0", + "phpfastcache/riak-client": "~1.4.4", + "predis/predis": "~1.1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Phpfastcache\\": "lib/Phpfastcache/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Georges.L", + "email": "contact@geolim4.com", + "homepage": "https://github.com/Geolim4", + "role": "Actual Project Manager/Developer" + }, + { + "name": "Khoa Bui", + "email": "khoaofgod@gmail.com", + "homepage": "https://www.phpfastcache.com", + "role": "Former Project Developer/Original Creator" + } + ], + "description": "PHP Abstract Cache Class - Reduce your database call using cache system. PhpFastCache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ssdb, Sqlite, Wincache, Xcache, Zend Data Cache.", + "homepage": "https://www.phpfastcache.com", + "keywords": [ + "LevelDb", + "abstract", + "apc", + "apcu", + "cache", + "cache class", + "caching", + "cassandra", + "cookie", + "couchbase", + "couchdb", + "files cache", + "memcache", + "memcached", + "mongodb", + "mysql cache", + "pdo cache", + "php cache", + "predis", + "redis", + "ssdb", + "wincache", + "xcache", + "zend", + "zend data cache", + "zend disk cache", + "zend memory cache", + "zend server" + ], + "funding": [ + { + "url": "https://github.com/geolim4", + "type": "github" + }, + { + "url": "https://www.patreon.com/geolim4", + "type": "patreon" + } + ], + "time": "2021-08-12T11:55:02+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, { "name": "smarty/smarty", "version": "v3.1.44", diff --git a/system/caches/Phpfastcache/autoload.php b/system/caches/Phpfastcache/autoload.php deleted file mode 100644 index 0466c1d..0000000 --- a/system/caches/Phpfastcache/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - * @see http://www.php-fig.org/psr/psr-0/ - * @see http://www.php-fig.org/psr/psr-4/ - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - private $classMapAuthoritative = false; - private $missingClasses = array(); - private $apcuPrefix; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * APCu prefix to use to cache found/not-found classes, if the extension is enabled. - * - * @param string|null $apcuPrefix - */ - public function setApcuPrefix($apcuPrefix) - { - $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; - } - - /** - * The APCu prefix in use, or null if APCu caching is not enabled. - * - * @return string|null - */ - public function getApcuPrefix() - { - return $this->apcuPrefix; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { - return false; - } - if (null !== $this->apcuPrefix) { - $file = apcu_fetch($this->apcuPrefix.$class, $hit); - if ($hit) { - return $file; - } - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if (false === $file && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if (null !== $this->apcuPrefix) { - apcu_add($this->apcuPrefix.$class, $file); - } - - if (false === $file) { - // Remember that this class does not exist. - $this->missingClasses[$class] = true; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - $subPath = $class; - while (false !== $lastPos = strrpos($subPath, '\\')) { - $subPath = substr($subPath, 0, $lastPos); - $search = $subPath.'\\'; - if (isset($this->prefixDirsPsr4[$search])) { - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); - foreach ($this->prefixDirsPsr4[$search] as $dir) { - if (file_exists($file = $dir . $pathEnd)) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - - return false; - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/system/caches/Phpfastcache/composer/LICENSE b/system/caches/Phpfastcache/composer/LICENSE deleted file mode 100644 index f27399a..0000000 --- a/system/caches/Phpfastcache/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - -Copyright (c) Nils Adermann, Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/system/caches/Phpfastcache/composer/autoload_classmap.php b/system/caches/Phpfastcache/composer/autoload_classmap.php deleted file mode 100644 index 7a91153..0000000 --- a/system/caches/Phpfastcache/composer/autoload_classmap.php +++ /dev/null @@ -1,9 +0,0 @@ - array($vendorDir . '/psr/simple-cache/src'), - 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), - 'Phpfastcache\\' => array($vendorDir . '/phpfastcache/phpfastcache/lib/Phpfastcache'), -); diff --git a/system/caches/Phpfastcache/composer/autoload_real.php b/system/caches/Phpfastcache/composer/autoload_real.php deleted file mode 100644 index c1e827f..0000000 --- a/system/caches/Phpfastcache/composer/autoload_real.php +++ /dev/null @@ -1,52 +0,0 @@ -= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require_once __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInitc3ab4c61f64ed5b4625d22b9465a323a::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } - - $loader->register(true); - - return $loader; - } -} diff --git a/system/caches/Phpfastcache/composer/autoload_static.php b/system/caches/Phpfastcache/composer/autoload_static.php deleted file mode 100644 index 4f1c55e..0000000 --- a/system/caches/Phpfastcache/composer/autoload_static.php +++ /dev/null @@ -1,41 +0,0 @@ - - array ( - 'Psr\\SimpleCache\\' => 16, - 'Psr\\Cache\\' => 10, - 'Phpfastcache\\' => 13, - ), - ); - - public static $prefixDirsPsr4 = array ( - 'Psr\\SimpleCache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/simple-cache/src', - ), - 'Psr\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/cache/src', - ), - 'Phpfastcache\\' => - array ( - 0 => __DIR__ . '/..' . '/phpfastcache/phpfastcache/lib/Phpfastcache', - ), - ); - - public static function getInitializer(ClassLoader $loader) - { - return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitc3ab4c61f64ed5b4625d22b9465a323a::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitc3ab4c61f64ed5b4625d22b9465a323a::$prefixDirsPsr4; - - }, null, ClassLoader::class); - } -} diff --git a/system/caches/Phpfastcache/composer/installed.json b/system/caches/Phpfastcache/composer/installed.json deleted file mode 100644 index 2c2fb8e..0000000 --- a/system/caches/Phpfastcache/composer/installed.json +++ /dev/null @@ -1,202 +0,0 @@ -[ - { - "name": "phpfastcache/phpfastcache", - "version": "7.0.5", - "version_normalized": "7.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/PHPSocialNetwork/phpfastcache.git", - "reference": "64638b27f473aa26603e84288d91a2b80a4aa388" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPSocialNetwork/phpfastcache/zipball/64638b27f473aa26603e84288d91a2b80a4aa388", - "reference": "64638b27f473aa26603e84288d91a2b80a4aa388", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=7.0", - "psr/cache": "~1.0.0", - "psr/simple-cache": "~1.0.0" - }, - "conflict": { - "basho/riak": "*", - "doctrine/couchdb": "*" - }, - "suggest": { - "ext-apc": "*", - "ext-couchbase": "*", - "ext-intl": "*", - "ext-leveldb": "*", - "ext-memcache": "*", - "ext-memcached": "*", - "ext-redis": "*", - "ext-sqlite": "*", - "ext-wincache": "*", - "ext-xcache": "*", - "mongodb/mongodb": "^1.1", - "phpfastcache/couchdb": "~1.0.0", - "phpfastcache/phpssdb": "~1.0.0", - "phpfastcache/riak-client": "~1.4.4", - "predis/predis": "~1.1.0" - }, - "time": "2019-03-03T14:39:16+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Phpfastcache\\": "lib/Phpfastcache/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Georges.L", - "email": "contact@geolim4.com", - "homepage": "https://github.com/Geolim4", - "role": "Actual Project Manager/Developer" - }, - { - "name": "Khoa Bui", - "email": "khoaofgod@gmail.com", - "homepage": "https://www.phpfastcache.com", - "role": "Former Project Developer/Original Creator" - } - ], - "description": "PHP Abstract Cache Class - Reduce your database call using cache system. PhpFastCache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ssdb, Sqlite, Wincache, Xcache, Zend Data Cache.", - "homepage": "https://www.phpfastcache.com", - "keywords": [ - "LevelDb", - "abstract", - "apc", - "apcu", - "cache", - "cache class", - "caching", - "cassandra", - "cookie", - "couchbase", - "couchdb", - "files cache", - "memcache", - "memcached", - "mongodb", - "mysql cache", - "pdo cache", - "php cache", - "predis", - "redis", - "ssdb", - "wincache", - "xcache", - "zend", - "zend data cache", - "zend disk cache", - "zend memory cache", - "zend server" - ] - }, - { - "name": "psr/cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2016-08-06T20:24:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ] - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2017-10-23T01:57:42+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ] - } -] diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/Config.php deleted file mode 100644 index eb322f9..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/Config.php +++ /dev/null @@ -1,25 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ -declare(strict_types=1); -namespace Phpfastcache\Config; - -/** - * Class Config - * Alias of ConfigurationOption - * @package phpFastCache\Config - * @see ConfigurationOption - */ -class Config extends ConfigurationOption -{ -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Config.php deleted file mode 100644 index 30b9e7c..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Apc; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Config.php deleted file mode 100644 index b333aea..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Apcu; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Config.php deleted file mode 100644 index 82253ca..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Config.php +++ /dev/null @@ -1,177 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Cassandra; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - /** - * @var int - */ - protected $port = 9042; - /** - * @var int - */ - protected $timeout = 2; - /** - * @var string - */ - protected $username = ''; - /** - * @var string - */ - protected $password = ''; - /** - * @var bool - */ - protected $sslEnabled = false; - /** - * @var bool - */ - protected $sslVerify = false; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return self - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } - - /** - * @param string $username - * @return self - */ - public function setUsername(string $username): self - { - $this->username = $username; - return $this; - } - - /** - * @return string - */ - public function getPassword(): string - { - return $this->password; - } - - /** - * @param string $password - * @return self - */ - public function setPassword(string $password): self - { - $this->password = $password; - return $this; - } - - /** - * @return bool - */ - public function isSslEnabled(): bool - { - return $this->sslEnabled; - } - - /** - * @param bool $sslEnabled - * @return self - */ - public function setSslEnabled(bool $sslEnabled): self - { - $this->sslEnabled = $sslEnabled; - return $this; - } - - /** - * @return bool - */ - public function isSslVerify(): bool - { - return $this->sslVerify; - } - - /** - * @param bool $sslVerify - * @return self - */ - public function setSslVerify(bool $sslVerify): self - { - $this->sslVerify = $sslVerify; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Config.php deleted file mode 100644 index de4099c..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Config.php +++ /dev/null @@ -1,23 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Cookie; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Config.php deleted file mode 100644 index d70cfd2..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Config.php +++ /dev/null @@ -1,137 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Couchbase; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 8091;// SSL: 18091 - - /** - * @var string - */ - protected $username = ''; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var string - */ - protected $bucketName = 'default'; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return Config - */ - public function setHost(string $host): Config - { - $this->host = $host; - return $this; - } - - /** - * @return int|null - */ - public function getPort() - { - return $this->port; - } - - /** - * @param int $port - * @return Config - */ - public function setPort(int $port = null): Config - { - $this->port = $port; - return $this; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } - - /** - * @param string $username - * @return Config - */ - public function setUsername(string $username): Config - { - $this->username = $username; - return $this; - } - - /** - * @return string - */ - public function getPassword(): string - { - return $this->password; - } - - /** - * @param string $password - * @return Config - */ - public function setPassword(string $password): Config - { - $this->password = $password; - return $this; - } - - /** - * @return string - */ - public function getBucketName(): string - { - return $this->bucketName; - } - - /** - * @param string $bucketName - * @return Config - */ - public function setBucketName(string $bucketName): Config - { - $this->bucketName = $bucketName; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Config.php deleted file mode 100644 index 07f2bfb..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Config.php +++ /dev/null @@ -1,184 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Couchdb; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - /** - * @var int - */ - protected $port = 5984; - - /** - * @var string - */ - protected $path = '/'; - - /** - * @var string - */ - protected $username = ''; - /** - * @var string - */ - protected $password = ''; - /** - * @var bool - */ - protected $ssl = false; - /** - * @var int - */ - protected $timeout = 10; - - /** - * @var string - */ - protected $database = Driver::COUCHDB_DEFAULT_DB_NAME; - - /** - * @return string - */ - public function getDatabase(): string - { - return $this->database; - } - - /** - * @param string $database - * @return Config - */ - public function setDatabase(string $database): Config - { - $this->database = $database; - return $this; - } - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } - - /** - * @param string $username - * @return self - */ - public function setUsername(string $username): self - { - $this->username = $username; - return $this; - } - - /** - * @return string - */ - public function getPassword(): string - { - return $this->password; - } - - /** - * @param string $password - * @return self - */ - public function setPassword(string $password): self - { - $this->password = $password; - return $this; - } - - /** - * @return bool - */ - public function isSsl(): bool - { - return $this->ssl; - } - - /** - * @param bool $ssl - * @return self - */ - public function setSsl(bool $ssl): self - { - $this->ssl = $ssl; - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return self - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Config.php deleted file mode 100644 index 05b0e13..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Devfalse; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Config.php deleted file mode 100644 index be5fab9..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Devnull; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Config.php deleted file mode 100644 index fc59c1f..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Devtrue; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Config.php deleted file mode 100644 index 52fee20..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Config.php +++ /dev/null @@ -1,26 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Files; - -use Phpfastcache\Config\{ - ConfigurationOption, IOConfigurationOptionTrait -}; - -class Config extends ConfigurationOption -{ - use IOConfigurationOptionTrait; -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Config.php deleted file mode 100644 index 58d2074..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Config.php +++ /dev/null @@ -1,45 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Leveldb; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $htaccess = true; - - /** - * @return string - */ - public function getHtaccess(): string - { - return $this->htaccess; - } - - /** - * @param string $htaccess - * @return self - */ - public function setHtaccess(string $htaccess): self - { - $this->htaccess = $htaccess; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Config.php deleted file mode 100644 index cfcad6a..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Config.php +++ /dev/null @@ -1,163 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Memcache; - -use Phpfastcache\Config\ConfigurationOption; -use Phpfastcache\Exceptions\PhpfastcacheInvalidConfigurationException; - -class Config extends ConfigurationOption -{ - /** - * @var array - * - * Multiple server can be added this way: - * $cfg->setServers([ - * [ - * 'host' => '127.0.0.1', - * 'port' => 11211, - * 'saslUser' => false, - * 'saslPassword' => false, - * ] - * ]); - */ - protected $servers = []; - - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 11211; - - /** - * @var string - */ - protected $saslUser = ''; - - /** - * @var string - */ - protected $saslPassword = ''; - - /** - * @return bool - */ - public function getSaslUser(): string - { - return $this->saslUser; - } - - /** - * @param string $saslUser - * @return self - */ - public function setSaslUser(string $saslUser): self - { - $this->saslUser = $saslUser; - return $this; - } - - /** - * @return string - */ - public function getSaslPassword(): string - { - return $this->saslPassword; - } - - /** - * @param string $saslPassword - * @return self - */ - public function setSaslPassword(string $saslPassword): self - { - $this->saslPassword = $saslPassword; - return $this; - } - - /** - * @return array - */ - public function getServers(): array - { - return $this->servers; - } - - /** - * @param array $servers - * @throws PhpfastcacheInvalidConfigurationException - * @return self - */ - public function setServers(array $servers): self - { - foreach ($servers as $server) { - if($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))){ - throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: '. \implode(', ', $diff)); - } - if($diff = \array_diff( \array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])){ - throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: '. \implode(', ', $diff)); - } - if(!\is_string($server['host'])){ - throw new PhpfastcacheInvalidConfigurationException('Host must be a valid string in "$server" configuration array'); - } - if(!\is_int($server['port'])){ - throw new PhpfastcacheInvalidConfigurationException('Port must be a valid integer in "$server" configuration array'); - } - } - $this->servers = $servers; - return $this; - } - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Config.php deleted file mode 100644 index c1bee5f..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Config.php +++ /dev/null @@ -1,163 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Memcached; - -use Phpfastcache\Config\ConfigurationOption; -use Phpfastcache\Exceptions\PhpfastcacheInvalidConfigurationException; - -class Config extends ConfigurationOption -{ - /** - * @var array - * - * Multiple server can be added this way: - * $cfg->setServers([ - * [ - * 'host' => '127.0.0.1', - * 'port' => 11211, - * 'saslUser' => false, - * 'saslPassword' => false, - * ] - * ]); - */ - protected $servers = []; - - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 11211; - - /** - * @var string - */ - protected $saslUser = ''; - - /** - * @var string - */ - protected $saslPassword = ''; - - /** - * @return string - */ - public function getSaslUser(): string - { - return $this->saslUser; - } - - /** - * @param string $saslUser - * @return self - */ - public function setSaslUser(string $saslUser): self - { - $this->saslUser = $saslUser; - return $this; - } - - /** - * @return string - */ - public function getSaslPassword(): string - { - return $this->saslPassword; - } - - /** - * @param string $saslPassword - * @return self - */ - public function setSaslPassword(string $saslPassword): self - { - $this->saslPassword = $saslPassword; - return $this; - } - - /** - * @return array - */ - public function getServers(): array - { - return $this->servers; - } - - /** - * @param array $servers - * @throws PhpfastcacheInvalidConfigurationException - * @return self - */ - public function setServers(array $servers): self - { - foreach ($servers as $server) { - if($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))){ - throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: '. \implode(', ', $diff)); - } - if($diff = \array_diff( \array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])){ - throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: '. \implode(', ', $diff)); - } - if(!\is_string($server['host'])){ - throw new PhpfastcacheInvalidConfigurationException('Host must be a valid string in "$server" configuration array'); - } - if(!\is_int($server['port'])){ - throw new PhpfastcacheInvalidConfigurationException('Port must be a valid integer in "$server" configuration array'); - } - } - $this->servers = $servers; - return $this; - } - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return Config - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Config.php deleted file mode 100644 index 72baab4..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Memstatic; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Config.php deleted file mode 100644 index 543c3fe..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Config.php +++ /dev/null @@ -1,253 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Mongodb; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 27017; - - /** - * @var int - */ - protected $timeout = 3; - - /** - * @var string - */ - protected $username = ''; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var array - */ - protected $servers = []; - - /** - * @var string - */ - protected $collectionName = 'Cache'; - - /** - * @var string - */ - protected $databaseName = Driver::MONGODB_DEFAULT_DB_NAME; - - /** - * @var array - */ - protected $options = []; - - /** - * @var array - */ - protected $driverOptions = []; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return self - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } - - /** - * @return string - */ - public function getUsername(): string - { - return $this->username; - } - - /** - * @param string $username - * @return self - */ - public function setUsername(string $username): self - { - $this->username = $username; - return $this; - } - - /** - * @return string - */ - public function getPassword(): string - { - return $this->password; - } - - /** - * @param string $password - * @return self - */ - public function setPassword(string $password): self - { - $this->password = $password; - return $this; - } - - /** - * @return array - */ - public function getServers(): array - { - return $this->servers; - } - - /** - * @param array $servers - * @return self - */ - public function setServers(array $servers): self - { - $this->servers = $servers; - return $this; - } - - /** - * @return string - */ - public function getCollectionName(): string - { - return $this->collectionName; - } - - /** - * @param string $collectionName - * @return self - */ - public function setCollectionName(string $collectionName): self - { - $this->collectionName = $collectionName; - return $this; - } - - /** - * @return string - */ - public function getDatabaseName(): string - { - return $this->databaseName; - } - - /** - * @param string $databaseName - * @return self - */ - public function setDatabaseName(string $databaseName): self - { - $this->databaseName = $databaseName; - return $this; - } - - /** - * @return array - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * @see https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options - * @param array $options - * @return Config - */ - public function setOptions(array $options): self - { - $this->options = $options; - return $this; - } - - /** - * @return array - */ - public function getDriverOptions(): array - { - return $this->driverOptions; - } - - /** - * @param array $driverOptions - * @return self - */ - public function setDriverOptions(array $driverOptions): self - { - $this->driverOptions = $driverOptions; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Config.php deleted file mode 100644 index 44d2442..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Config.php +++ /dev/null @@ -1,199 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Predis; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 6379; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var int - */ - protected $database = 0; - - /** - * @var \Predis\Client - */ - protected $predisClient; - - /** - * @var string - */ - protected $optPrefix = ''; - - /** - * @var int - */ - protected $timeout = 5; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return Config - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return Config - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return null - */ - public function getPassword() - { - return $this->password; - } - - /** - * @param null $password - * @return self - */ - public function setPassword(string $password): self - { - $this->password = $password; - return $this; - } - - /** - * @return int - */ - public function getDatabase(): int - { - return $this->database; - } - - /** - * @param int $database - * @return Config - */ - public function setDatabase(int $database): self - { - $this->database = $database; - return $this; - } - - /** - * @return array - */ - public function getPredisConfigArray(): array - { - return [ - 'host' => $this->getHost(), - 'port' => $this->getPort(), - 'password' => $this->getPassword() ?: null, - 'database' => $this->getDatabase(), - 'timeout' => $this->getTimeout(), - ]; - } - - /** - * @return \Predis\Client|null - */ - public function getPredisClient() - { - return $this->predisClient; - } - - /** - * @param \Predis\Client $predisClient |null - * @return Config - */ - public function setPredisClient(\Predis\Client $predisClient = null): Config - { - $this->predisClient = $predisClient; - return $this; - } - - /** - * @return string - * @since 7.0.2 - */ - public function getOptPrefix(): string - { - return $this->optPrefix; - } - - /** - * @param string $optPrefix - * @return Config - * @since 7.0.2 - */ - public function setOptPrefix(string $optPrefix): Config - { - $this->optPrefix = trim($optPrefix); - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return self - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Config.php deleted file mode 100644 index 2c94ceb..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Config.php +++ /dev/null @@ -1,186 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Redis; - -use Phpfastcache\Config\ConfigurationOption; -use Redis as RedisClient; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 6379; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var int - */ - protected $database = 0; - - /** - * @var int - */ - protected $timeout = 5; - - /** - * @var RedisClient - */ - protected $redisClient; - - /** - * @var string - */ - protected $optPrefix = ''; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return mixed - */ - public function getPassword() - { - return $this->password; - } - - /** - * @param string $password - * @return self - */ - public function setPassword(string $password): self - { - $this->password = $password; - return $this; - } - - /** - * @return int - */ - public function getDatabase(): int - { - return $this->database; - } - - /** - * @param int $database - * @return self - */ - public function setDatabase(int $database): self - { - $this->database = $database; - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return self - */ - public function setTimeout(int $timeout): self - { - $this->timeout = $timeout; - return $this; - } - - /** - * @return RedisClient|null - */ - public function getRedisClient() - { - return $this->redisClient; - } - - /** - * @param RedisClient $predisClient |null - * @return Config - */ - public function setRedisClient(RedisClient $redisClient = null): Config - { - $this->redisClient = $redisClient; - return $this; - } - - /** - * @return string - * @since 7.0.2 - */ - public function getOptPrefix(): string - { - return $this->optPrefix; - } - - /** - * @param string $optPrefix - * @return Config - * @since 7.0.2 - */ - public function setOptPrefix(string $optPrefix): Config - { - $this->optPrefix = trim($optPrefix); - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Config.php deleted file mode 100644 index 8d4a037..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Config.php +++ /dev/null @@ -1,114 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Riak; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 8098; - - /** - * @var string - */ - protected $prefix = 'riak'; - - /** - * @var string - */ - protected $bucketName = Driver::RIAK_DEFAULT_BUCKET_NAME; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return self - */ - public function setHost(string $host): self - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return self - */ - public function setPort(int $port): self - { - $this->port = $port; - return $this; - } - - /** - * @return string - */ - public function getPrefix(): string - { - return $this->prefix; - } - - /** - * @param string $prefix - * @return self - */ - public function setPrefix(string $prefix): self - { - $this->prefix = $prefix; - return $this; - } - - /** - * @return string - */ - public function getBucketName(): string - { - return $this->bucketName; - } - - /** - * @param string $bucketName - * @return self - */ - public function setBucketName(string $bucketName): self - { - $this->bucketName = $bucketName; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Config.php deleted file mode 100644 index ce1dc8e..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Config.php +++ /dev/null @@ -1,26 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Sqlite; - -use Phpfastcache\Config\{ - ConfigurationOption, IOConfigurationOptionTrait -}; - -class Config extends ConfigurationOption -{ - use IOConfigurationOptionTrait; -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Config.php deleted file mode 100644 index f572eed..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Config.php +++ /dev/null @@ -1,114 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Ssdb; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - /** - * @var string - */ - protected $host = '127.0.0.1'; - - /** - * @var int - */ - protected $port = 8888; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var int - */ - protected $timeout = 2000; - - /** - * @return string - */ - public function getHost(): string - { - return $this->host; - } - - /** - * @param string $host - * @return Config - */ - public function setHost(string $host): Config - { - $this->host = $host; - return $this; - } - - /** - * @return int - */ - public function getPort(): int - { - return $this->port; - } - - /** - * @param int $port - * @return Config - */ - public function setPort(int $port): Config - { - $this->port = $port; - return $this; - } - - /** - * @return string - */ - public function getPassword(): string - { - return $this->password; - } - - /** - * @param string $password - * @return Config - */ - public function setPassword(string $password): Config - { - $this->password = $password; - return $this; - } - - /** - * @return int - */ - public function getTimeout(): int - { - return $this->timeout; - } - - /** - * @param int $timeout - * @return Config - */ - public function setTimeout(int $timeout): Config - { - $this->timeout = $timeout; - return $this; - } -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Config.php deleted file mode 100644 index 4d89fea..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Wincache; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Config.php deleted file mode 100644 index 1185f37..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Xcache; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Config.php deleted file mode 100644 index 36c9057..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Zenddisk; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Config.php b/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Config.php deleted file mode 100644 index ff43929..0000000 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Config.php +++ /dev/null @@ -1,24 +0,0 @@ - https://www.phpfastcache.com - * @author Georges.L (Geolim4) - * - */ - -declare(strict_types=1); - -namespace Phpfastcache\Drivers\Zendshm; - -use Phpfastcache\Config\ConfigurationOption; - -class Config extends ConfigurationOption -{ - -} \ No newline at end of file diff --git a/system/caches/autoload.php b/system/caches/autoload.php index 0c14c20..a0f873c 100644 --- a/system/caches/autoload.php +++ b/system/caches/autoload.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -if(defined('USE_PHPFASTCACHE') && USE_PHPFASTCACHE == true && version_compare(phpversion(), '7.0.0', '>')) - require_once DIR_SYSTEM."caches/phpfastcache.php"; +if(\Phacil\Framework\Config::USE_PHPFASTCACHE() && version_compare(phpversion(), '7.0.0', '>')) + require_once \Phacil\Framework\Config::DIR_SYSTEM()."caches/phpfastcache.php"; else - require_once DIR_SYSTEM."caches/caches.php"; \ No newline at end of file + require_once \Phacil\Framework\Config::DIR_SYSTEM()."caches/caches.php"; \ No newline at end of file diff --git a/system/caches/caches.php b/system/caches/caches.php index 1d2a24a..f3665c6 100644 --- a/system/caches/caches.php +++ b/system/caches/caches.php @@ -23,12 +23,12 @@ final class Caches { /** @return void */ public function __construct() { - $this->dirCache = DIR_CACHE."caches/"; + $this->dirCache = \Phacil\Framework\Config::DIR_CACHE()."caches/"; if (!file_exists($this->dirCache)) { mkdir($this->dirCache, 0760, true); } - $this->expire = (defined('CACHE_EXPIRE')) ? CACHE_EXPIRE : 3600; + $this->expire = (defined('CACHE_EXPIRE')) ? \Phacil\Framework\Config::CACHE_EXPIRE() : 3600; } @@ -200,7 +200,7 @@ final class Caches { $bytestotal = 0; $path = realpath($path); if($path!==false){ - foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object){ + foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS)) as $object){ $bytestotal += $object->getSize(); } } diff --git a/system/caches/phpfastcache.php b/system/caches/phpfastcache.php index 445a930..531573b 100644 --- a/system/caches/phpfastcache.php +++ b/system/caches/phpfastcache.php @@ -2,7 +2,7 @@ namespace Phacil\Framework; -require_once __DIR__."/Phpfastcache/autoload.php"; +//require_once __DIR__."/Phpfastcache/autoload.php"; use Phpfastcache\CacheManager; use Phpfastcache\Config\ConfigurationOption; @@ -14,6 +14,7 @@ use Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException; use Phpfastcache\Exceptions\PhpfastcacheDriverException; use Phpfastcache\Exceptions\PhpfastcacheInstanceNotFoundException; use stdClass; +use Phacil\Framework\Config; /** @package Phacil\Framework */ final class Caches @@ -50,14 +51,14 @@ final class Caches if (!file_exists($this->dirCache)) { mkdir($this->dirCache, 0755, true); } - $this->expire = (defined('CACHE_EXPIRE')) ? CACHE_EXPIRE : 3600; + $this->expire = Config::CACHE_EXPIRE() ?: 3600; - (defined('CACHE_SETTINGS') && is_array(CACHE_SETTINGS)) ? CacheManager::setDefaultConfig(new ConfigurationOption(CACHE_SETTINGS)) : CacheManager::setDefaultConfig(new ConfigurationOption(array('path' => $this->dirCache))); + (Config::CACHE_SETTINGS() && is_array(Config::CACHE_SETTINGS())) ? CacheManager::setDefaultConfig(new ConfigurationOption(Config::CACHE_SETTINGS())) : CacheManager::setDefaultConfig(new ConfigurationOption(array('path' => $this->dirCache))); $instancias = ((CacheManager::getInstances())); if(count($instancias) < 1) - $this->phpfastcache = (defined('CACHE_DRIVER')) ? CacheManager::getInstance(CACHE_DRIVER) : CacheManager::getInstance('files'); + $this->phpfastcache = (Config::CACHE_DRIVER()) ? CacheManager::getInstance(Config::CACHE_DRIVER()) : CacheManager::getInstance('files'); else $this->phpfastcache = CacheManager::getInstanceById(array_keys($instancias)[0]); diff --git a/system/vendor/composer/autoload_psr4.php b/system/vendor/composer/autoload_psr4.php index 4570fbf..f942aeb 100644 --- a/system/vendor/composer/autoload_psr4.php +++ b/system/vendor/composer/autoload_psr4.php @@ -9,4 +9,7 @@ return array( 'Twig\\' => array($vendorDir . '/twig/twig/src'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), + 'Phpfastcache\\' => array($vendorDir . '/phpfastcache/phpfastcache/lib/Phpfastcache'), ); diff --git a/system/vendor/composer/autoload_static.php b/system/vendor/composer/autoload_static.php index 562883b..13b7bc1 100644 --- a/system/vendor/composer/autoload_static.php +++ b/system/vendor/composer/autoload_static.php @@ -21,6 +21,12 @@ class ComposerStaticInit7e317f01bc8a34d224e1b16b9d2ff721 'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Polyfill\\Ctype\\' => 23, ), + 'P' => + array ( + 'Psr\\SimpleCache\\' => 16, + 'Psr\\Cache\\' => 10, + 'Phpfastcache\\' => 13, + ), ); public static $prefixDirsPsr4 = array ( @@ -36,6 +42,18 @@ class ComposerStaticInit7e317f01bc8a34d224e1b16b9d2ff721 array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), + 'Phpfastcache\\' => + array ( + 0 => __DIR__ . '/..' . '/phpfastcache/phpfastcache/lib/Phpfastcache', + ), ); public static $prefixesPsr0 = array ( diff --git a/system/vendor/composer/installed.json b/system/vendor/composer/installed.json index f679c4e..c2dfd94 100644 --- a/system/vendor/composer/installed.json +++ b/system/vendor/composer/installed.json @@ -96,6 +96,216 @@ "templating" ] }, + { + "name": "phpfastcache/phpfastcache", + "version": "7.1.2", + "version_normalized": "7.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/PHPSocialNetwork/phpfastcache.git", + "reference": "ee5e7fc730aeef7b0e0970adc038168b4087601c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPSocialNetwork/phpfastcache/zipball/ee5e7fc730aeef7b0e0970adc038168b4087601c", + "reference": "ee5e7fc730aeef7b0e0970adc038168b4087601c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=7.0", + "psr/cache": "~1.0.0", + "psr/simple-cache": "~1.0.0" + }, + "conflict": { + "basho/riak": "*", + "doctrine/couchdb": "*" + }, + "suggest": { + "ext-apc": "*", + "ext-couchbase": "*", + "ext-intl": "*", + "ext-leveldb": "*", + "ext-memcache": "*", + "ext-memcached": "*", + "ext-redis": "*", + "ext-sqlite": "*", + "ext-wincache": "*", + "ext-xcache": "*", + "mongodb/mongodb": "^1.1", + "phpfastcache/couchdb": "~1.0.0", + "phpfastcache/phpssdb": "~1.0.0", + "phpfastcache/riak-client": "~1.4.4", + "predis/predis": "~1.1.0" + }, + "time": "2021-08-12T11:55:02+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Phpfastcache\\": "lib/Phpfastcache/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Georges.L", + "email": "contact@geolim4.com", + "homepage": "https://github.com/Geolim4", + "role": "Actual Project Manager/Developer" + }, + { + "name": "Khoa Bui", + "email": "khoaofgod@gmail.com", + "homepage": "https://www.phpfastcache.com", + "role": "Former Project Developer/Original Creator" + } + ], + "description": "PHP Abstract Cache Class - Reduce your database call using cache system. PhpFastCache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ssdb, Sqlite, Wincache, Xcache, Zend Data Cache.", + "homepage": "https://www.phpfastcache.com", + "keywords": [ + "LevelDb", + "abstract", + "apc", + "apcu", + "cache", + "cache class", + "caching", + "cassandra", + "cookie", + "couchbase", + "couchdb", + "files cache", + "memcache", + "memcached", + "mongodb", + "mysql cache", + "pdo cache", + "php cache", + "predis", + "redis", + "ssdb", + "wincache", + "xcache", + "zend", + "zend data cache", + "zend disk cache", + "zend memory cache", + "zend server" + ], + "funding": [ + { + "url": "https://github.com/geolim4", + "type": "github" + }, + { + "url": "https://www.patreon.com/geolim4", + "type": "patreon" + } + ] + }, + { + "name": "psr/cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T20:24:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ] + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ] + }, { "name": "smarty/smarty", "version": "v3.1.44", diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/CHANGELOG.md b/system/vendor/phpfastcache/phpfastcache/CHANGELOG.md similarity index 87% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/CHANGELOG.md rename to system/vendor/phpfastcache/phpfastcache/CHANGELOG.md index a4a7bd3..d6d5a15 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/CHANGELOG.md +++ b/system/vendor/phpfastcache/phpfastcache/CHANGELOG.md @@ -1,3 +1,47 @@ +## 7.1.2 +#### _"Rust-weak"_ +##### 12 august 2021 +- __Global__ + - Improved PHP 7.4 support + - Fixed #768 // Psalm issue with the 3rd parameter of Psr16Adapter::set has to be null (@geolim4) + - Fixed #781 // Type issue (@geolim4) +- __Docs__ + - Fixed vulnerability issue that cause exposed phpinfo() in some situations (@geolim4) +- __Drivers__ + - Fixed #759 // Memcached Bytes Replaced with Version (@geolim4) + +## 7.1.1 +#### _"Rust-out"_ +##### 24 april 2020 +- __Drivers__ + - Fixed #716 // TypeError in lib/Phpfastcache/Drivers/Cookie/Driver.php (@motikan2010) + - Fixed #733 // Removing path check in Redis driver before auth. (@gillytech) +- __Helpers__ + - Fixed #717 // Deprecate "ActOnAll" to remove it in v8 (@geolim4) +- __Misc__ + - Added v8 mention in Readme (@geolim4) + - Added Github Funding option (@geolim4) + +## 7.1.0 +#### _"Wake the rust"_ +##### 15 september 2019 +- __Drivers__ + - Fixed #692 // MongoDB driver DNS seedlist format (@Geolim4) + - Fixed #679 // TLS connexion for (P)Redis (@Geolim4) + - Fixed #689 // (P)redis persistent / pooled connections (@Geolim4) + - Fixed #680 // APC driverClear fails (@Geolim4) + - Fixed #699 // Fatal type error with ssdb-server >1.9.7 (@dmz86) + - Fixed #694 // Files driver rare bug (@Geolim4) +- __Helpers__ + - Fixed #700 // Psr16Adapter::deleteMultiple/getMultiple converts $keys to an array (@bylexus) + - Fixed #685 // Minor bug - fatal error in psr16 adapter if an exception is thrown (@MaximilianKresse) +- __Global__ + +- __Misc__ + - Updated "stale" policy (@geolim4) + - Added Security Policy (@geolim4) + - Fixed #695 // Typo in docs/examples/files.php (@hiroin) + ## 7.0.5 #### _"Rusted"_ ##### 3 march 2019 @@ -273,4 +317,4 @@ ## 7.0.0-dev ##### 01 october 2017 -- Initialized v7 development \ No newline at end of file +- Initialized v7 development diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/CHANGELOG_API.md b/system/vendor/phpfastcache/phpfastcache/CHANGELOG_API.md similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/CHANGELOG_API.md rename to system/vendor/phpfastcache/phpfastcache/CHANGELOG_API.md diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/LICENCE b/system/vendor/phpfastcache/phpfastcache/LICENCE similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/LICENCE rename to system/vendor/phpfastcache/phpfastcache/LICENCE diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/README.md b/system/vendor/phpfastcache/phpfastcache/README.md similarity index 99% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/README.md rename to system/vendor/phpfastcache/phpfastcache/README.md index 98cb672..861070b 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/README.md +++ b/system/vendor/phpfastcache/phpfastcache/README.md @@ -6,6 +6,7 @@ One of the biggest change is the configuration system which is now an object that replace the primitive array that we used to implement back then. Also please note that the V7 requires at least PHP7 or higher to work properly. +>:new: The V8 is now released, upgrade Phpfastcache by following our migration guide in `docs/migration` --------------------------- Simple Yet Powerful PHP Caching Class --------------------------- @@ -129,7 +130,7 @@ PhpFastCache provides you a lot of useful APIs: | `deleteItemsByTag($tagName)` | bool | Deletes items by a tag | | `deleteItemsByTags(array $tagNames)` | bool | Deletes items by one of multiple tag names | | `deleteItemsByTagsAll(array $tagNames)` | bool | Deletes items by all of multiple tag names | -| `detachAllItems($item)` | void | Detaches all items from the pool | +| `detachAllItems()` | void | Detaches all items from the pool | | `detachItem($item)` | void | Detaches an item from the pool | | `getConfig()` | ConfigurationOption | Returns the configuration object | | `getConfigOption($optionName);` | mixed | Returns a configuration value by its key `$optionName` | diff --git a/system/vendor/phpfastcache/phpfastcache/SECURITY.md b/system/vendor/phpfastcache/phpfastcache/SECURITY.md new file mode 100644 index 0000000..59529cf --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/SECURITY.md @@ -0,0 +1,22 @@ +# Security Policy +If you discover any vulnerability please be aware of the following table of supported versions below. +Then feel free to contact me at the email address provided in the bottom of that page. + +## Supported Versions +| Version | End of support | End of life | +| ------- | -------------------- | ------------------ | +| 8.0 | Not yet planned | Not yet planned | +| 7.1 | July 2021 | July 2022 | +| 7.0 | July 2019 | July 2020 | +| 6.0 | July 2020 | July 2021 | +| 5.0 | July 2018 | July 2019 | +| 4.0 | July 2017 | January 2018 | +| < 4.0 | N/A | N/A | + +More details on the [Wiki](https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV4%CB%96%5D-Global-support-timeline) + +## Reporting a Vulnerability +If you discover any security vulnerability contact me at contact#at#geolim4.com with a subject formatted like that:\ +`[PHPFASTCACHE][VULNERABILITY] Your subject goes here` + +Thanks in advance for taking the time to report me that in private. diff --git a/system/vendor/phpfastcache/phpfastcache/composer.json b/system/vendor/phpfastcache/phpfastcache/composer.json new file mode 100644 index 0000000..dc539e2 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/composer.json @@ -0,0 +1,56 @@ +{ + "name": "phpfastcache/phpfastcache", + "type" : "library", + "description": "PHP Abstract Cache Class - Reduce your database call using cache system. PhpFastCache handles a lot of drivers such as Apc(u), Cassandra, CouchBase, Couchdb, Mongodb, Files, (P)redis, Leveldb, Memcache(d), Ssdb, Sqlite, Wincache, Xcache, Zend Data Cache.", + "keywords": ["abstract", "cache","caching","php cache","mysql cache","apc","apcu","memcache","memcached","wincache","files cache","pdo cache","cache class","redis","predis","cookie", "mongodb", "cassandra", "couchdb", "couchbase", "LevelDb", "Ssdb", "Wincache", "xcache","zend","zend disk cache","zend memory cache","zend data cache","zend server"], + "homepage": "https://www.phpfastcache.com", + "license": "MIT", + "minimum-stability": "stable", + "authors": [ + { + "name": "Georges.L", + "email": "contact@geolim4.com", + "homepage": "https://github.com/Geolim4", + "role": "Actual Project Manager/Developer" + }, + { + "name": "Khoa Bui", + "email": "khoaofgod@gmail.com", + "homepage": "https://www.phpfastcache.com", + "role": "Former Project Developer/Original Creator" + } + ], + "require": { + "php": ">=7.0", + "psr/cache": "~1.0.0", + "psr/simple-cache": "~1.0.0", + "ext-mbstring": "*", + "ext-json": "*" + }, + "suggest": { + "ext-apc": "*", + "ext-intl": "*", + "ext-memcached": "*", + "ext-memcache": "*", + "ext-redis": "*", + "ext-xcache": "*", + "ext-sqlite": "*", + "ext-wincache": "*", + "ext-leveldb": "*", + "ext-couchbase": "*", + "predis/predis": "~1.1.0", + "mongodb/mongodb": "^1.1", + "phpfastcache/phpssdb": "~1.0.0", + "phpfastcache/couchdb": "~1.0.0", + "phpfastcache/riak-client": "~1.4.4" + }, + "conflict": { + "doctrine/couchdb": "*", + "basho/riak": "*" + }, + "autoload": { + "psr-4": { + "Phpfastcache\\": "lib/Phpfastcache/" + } + } +} diff --git a/system/vendor/phpfastcache/phpfastcache/docs/CREDITS.md b/system/vendor/phpfastcache/phpfastcache/docs/CREDITS.md new file mode 100644 index 0000000..dac9720 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/CREDITS.md @@ -0,0 +1,48 @@ +## phpFastCache Copyright (c) 2016 - 2017 +https://www.phpfastcache.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +__phpFastCache Current Project Manager:__ Georges.L (Geolim4) + +__phpFastCache Former Project Founder:__ Khoa Bui (khoaofgod) + +__phpFastCache Contributors:__ https://github.com/PHPSocialNetwork/phpfastcache/graphs/contributors + +#### Hall of fame (Special thanks): + +- __Jetbrains__ * for providing us a free IDE licence +- __Scrutinizer-CI__ * for providing us a free Security Analysis +- __VersionEye__ * For being an awesome tool that helped us to watch version dependencies. You will be missed, thanks you very much Robert. +- __Sabine van Lommen__ * from __Zend.com__ for providing us a free developer licence of Zend Server +- __Lucas (_hammermaps_)__ for the "Zend Data Cache" driver implementation +- __Anton (_git-webmaster_)__ for kindly providing us a Couchbase server for deep tests purposes. + +\* Thanks to the companies that provided us free access to their products to help us to build a better quality software every days. + +But above all, many thanks to these companies to support indisputably Open Source Projects. +Thanks to all the contributors that added their stone to the building. Each contribution made this project a bit better, every commits, every pull request you made contributed to make this project greater and better. + +#### Software licenses: + +- PHP License, version 3.0: + - Pear (c) 2001-2004 PHP Group, http://pear.php.net + +- MIT licenced: + - Predis (c) 2009-2015 Daniele Alessandri, https://clorophilla.net \ No newline at end of file diff --git a/system/vendor/phpfastcache/phpfastcache/docs/DRIVERS.md b/system/vendor/phpfastcache/phpfastcache/docs/DRIVERS.md new file mode 100644 index 0000000..8686b19 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/DRIVERS.md @@ -0,0 +1,49 @@ +### Drivers descriptions +* Apc + * The Alternative Php Cache (APC) driver. A memory cache for regular performances. +* Apcu + * The Alternative Php User Cache (APCU) driver. A memory cache for regular performances. +* Cassandra + * A very high-performance NoSQL driver using a key-value pair system. Please note that the Driver rely on php's Datastax extension: https://github.com/datastax/php-driver +* Cookie + * A cookie driver to store non-sensitive scalar (only) data. Limited storage up to 4Ko. +* Couchbase + * A very high-performance NoSQL driver using a key-value pair system +* Couchdb + * A very high-performance NoSQL driver using a key-value pair system +* Devfalse + * A development driver that return false for everything except driverCheck() +* Devnull + * A development driver that return null for driverRead() and driverIsHit() (get actions) and true for other action such as driverDelete, DriverClear() etc. +* Devtrue + * A development driver that return true for everything including driverCheck() +* Files + * A file driver that use serialization for storing data for regular performances. A _$path_ config must be specified, else the system temporary directory will be used. +* Leveldb + * A NoSQL driver using a key-value pair system. A _$path_ config must be specified, else the system temporary directory will be used. +* Memcache + * The Memcache driver. A memory cache for regular performances. Do not cross this driver with Memcached driver +* Memcached + * The Memcached driver. A memory cache for regular performances. Do not cross this driver with Memcache driver +* Memstatic + * The Memstatic driver is a memory static driver that expires when the script execution ends +* Mongodb + * A very high-performance NoSQL driver using a key-value pair system +* Predis + * A high-performance memory driver using a in-memory data structure storage. Less efficient than Redis driver as it is an embedded library +* Redis + * A very high-performance memory driver using a in-memory data structure storage. More efficient than Predis driver as it is an compiled library +* Riak + * A very high-performance NoSQL driver using a key-value pair system +* Sqlite + * A Sqlite driver that use serialization for storing data for regular performances. A _$path_ config must be specified, else the system temporary directory will be used. +* Ssdb + * A very high-performance NoSQL driver using a key-value pair system +* Wincache + * The Wincache driver. A memory cache for regular performances on Windows platforms. +* Xcache + * The Xcache driver. A memory cache for regular performances. +* Zend Disk Cache ( * Requires ZendServer Version 4 or higher * ) + * The Zend Data Cache is a by ZendServer supported file cache. The cache is for regular performance. +* Zend Memory Cache ( * Requires ZendServer Version 4 or higher * ) + * The Zend Memory Cache is a by ZendServer supported memory cache. The cache is for high-performance applications. \ No newline at end of file diff --git a/system/vendor/phpfastcache/phpfastcache/docs/EVENTS.md b/system/vendor/phpfastcache/phpfastcache/docs/EVENTS.md new file mode 100644 index 0000000..04e148d --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/EVENTS.md @@ -0,0 +1,176 @@ +:mega: As of the V6, PhpFastCache provides an event mechanism. +You can subscribe to an event by passing a Closure to an active event: + +```php +use Phpfastcache\EventManager; + +/** +* Bind the event callback +*/ +EventManager::getInstance()->onCacheGetItem(function(ExtendedCacheItemPoolInterface $itemPool, ExtendedCacheItemInterface $item){ + $item->set('[HACKED BY EVENT] ' . $item->get()); +}); + +``` + +An event callback can get unbind but you MUST provide a name to the callback previously: + + +```php +use Phpfastcache\EventManager; + +/** +* Bind the event callback +*/ +EventManager::getInstance()->onCacheGetItem(function(ExtendedCacheItemPoolInterface $itemPool, ExtendedCacheItemInterface $item){ + $item->set('[HACKED BY EVENT] ' . $item->get()); +}, 'myCallbackName'); + + +/** +* Unbind the event callback +*/ +EventManager::getInstance()->unbindEventCallback('onCacheGetItem', 'myCallbackName'); + +``` + + +List of active events: + +- onCacheGetItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface* **$item** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate an item just before it gets returned by the getItem() method. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::getItem()* + - *ExtendedCacheItemPoolInterface::getItems()* + - *ExtendedCacheItemPoolInterface::getItemsByTag()* + - *ExtendedCacheItemPoolInterface::getItemsAsJsonString()* + +- onCacheDeleteItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface* **$item** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate an item after being deleted. :exclamation: **Caution** The provided item is in pool detached-state. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::deleteItem()* + - *ExtendedCacheItemPoolInterface::getItem()* + - *ExtendedCacheItemPoolInterface::getItems()* + - *ExtendedCacheItemPoolInterface::getItemsByTag()* + - *ExtendedCacheItemPoolInterface::getItemsAsJsonString()* + +- onCacheSaveItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface* **$item** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate an item just before it gets saved by the driver. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::commit()* + - *ExtendedCacheItemPoolInterface::save()* + +- onCacheSaveDeferredItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface* **$item** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate an item just before it gets pre-saved by the driver. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::saveDeferred()* + +- onCacheCommitItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface[]* **$items** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate a set of items just before they gets pre-saved by the driver. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::commit()* + +- onCacheClearItem(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ExtendedCacheItemInterface[]* **$items** + - **Scope** + - ItemPool + - **Description** + - Allow you to manipulate a set of item just before they gets cleared by the driver. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::clear()* + - *ExtendedCacheItemPoolInterface::clean()* + + - onCacheWriteFileOnDisk(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *string* **$file** + - *bool* **$secureFileManipulation** + - **Scope** + - ItemPool + - **Description** + - Allow you to get notified when a file is written on disk. + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::writefile()* + +- onCacheGetItemInSlamBatch(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemPoolInterface* **$itemPool** + - *ItemBatch* **$driverData** + - *int* **$cacheSlamsSpendSeconds** + - **Scope** + - ItemPool + - **Description** + - Allow you to get notified each time a batch loop is looping + - **Risky Circular Methods** + - *ExtendedCacheItemPoolInterface::deleteItem()* + - *ExtendedCacheItemPoolInterface::getItem()* + - *ExtendedCacheItemPoolInterface::getItems()* + - *ExtendedCacheItemPoolInterface::getItemsByTag()* + - *ExtendedCacheItemPoolInterface::getItemsAsJsonString()* + +- onCacheItemSet(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemInterface* **$item** + - *mixed* **$value** + - **Scope** + - Item + - **Description** + - Allow you to get the value set to an item. + - **Risky Circular Methods** + - *ExtendedCacheItemInterface::get()* + +- onCacheItemExpireAt(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemInterface* **$item** + - *\DateTimeInterface* **$expiration** + - **Scope** + - Item + - **Description** + - Allow you to get/set the expiration date of an item. + - **Risky Circular Methods** + - *ExtendedCacheItemInterface::expiresAt()* + +- onCacheItemExpireAfter(*Callable* **$callback**) + - **Callback arguments** + - *ExtendedCacheItemInterface* **$item** + - *int | \DateInterval* **$time** + - **Scope** + - Item + - **Description** + - Allow you to get the "expire after" time of an item. If `$time` is a DateInterval you also set it. + - **Risky Circular Methods** + - *ExtendedCacheItemInterface::expiresAt()* + +This is an exhaustive list and it will be updated as soon as new events will be added to the Core. \ No newline at end of file diff --git a/system/vendor/phpfastcache/phpfastcache/docs/OPTIONS.md b/system/vendor/phpfastcache/phpfastcache/docs/OPTIONS.md new file mode 100644 index 0000000..a52ac3d --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/OPTIONS.md @@ -0,0 +1,43 @@ +PhpFastCache has some options that you may want to know before using them, here's the list: + +### File-based drivers options * +* **path** See the "**Host/Authenticating options**" section +* **default_chmod** _| int>octal (default: 0777)_ `[>=V4, octal (default: 0777)_ `[>=V7]` New configuration name of `default_chmod` as of V7 +* **securityKey** _| string (default: 'auto')_ `[>=V4]` A security key that define the subdirectory name. 'auto' value will be the HTTP_HOST value. +* **htaccess** _| bool (default: true)_ `[>=V4]` Option designed to (dis)allow the auto-generation of .htaccess. +* **autoTmpFallback** _| bool (default: false)_ `[>=V6]`Option designed to automatically attempt to fallback to temporary directory if the cache fails to write on the specified directory +* **secureFileManipulation** _| bool (default: false)_ `[>=V6]` This option enforces a strict I/O manipulation policy by adding more integrity checks. This option may slow down the write operations, therefore you must use it with caution. In case of failure an **phpFastCacheIOException** exception will be thrown. Currently only supported by _Files_ driver. +* **cacheFileExtension** _| string (default: 'txt')_ `[>=V6.0.2]` This allows you to setup a custom (but safe) cache file extension. + +\* Drivers like _Files_, _Sqlite_, _Leveldb_, etc. + +### Global options +* **fallback** _| string|bool_ (default: false)`[>=V4.2]` A driver name used in case the main driver stopped working. E.g. a missing php extension. +* **fallbackConfig** _| ConfigurationOption|null_ (default: null)`[>=V7]` A dedicated `ConfigurationOption` object for the `fallback` driver, if needed. +* **compress_data** _| bool (default: false)_ `[>=V4.3]` Compress stored data, if the backend supports it. Currently only supported by _Memcache(d)_ driver. +* **limited_memory_each_object** _| int (default: 4096)_ `[>=V4.2]` Maximum size (bytes) of object stored in memory. Currently only supported by _Cookie_ driver. +* **defaultTtl** _| int (default: 900)_ `[>=V5]` This option define a default ttl (time-to-live, in seconds) for item that has no specified expiration date/ttl. +* **itemDetailedDate** _| bool (default: false)_ `[>=V6]` This option will define if the Items will make use of detailed dates such as Creation/modification date. Trying to access to these date without being explicitly enabled will throw a `LogicException` +* **defaultKeyHashFunction** _| string (default: 'md5')_ `[>=V6]` This option will allow you to define a custom hash function for the `$item->getEncodedKey()` method. Callable objects are not allowed, but static method such as `\Absolute\Namespace\ToStatic::method` are allowed. +* **defaultFileNameHashFunction** _| string (default: 'md5')_ `[>=V7]` This option will allow you to define a custom hash function for every I/O method that ends up to write an hashed filename on the disk. +* **preventCacheSlams** _| bool (default: false)_ `[>=V6]` This option will allow you to prevent cache slams when making use of heavy cache items +* **cacheSlamsTimeout** _| int (default: 15)_ `[>=V6]` This option defines the cache slams timeout in seconds + +### Host/Authenticating options * +* **host** _| string (default: null)_ The hostname +* **path** _| string (default: null|string[temp. dir.])_ `[>=V4], [>=V6.1]` The absolute path where the written cache files belong to (system temp directory by default). **As of the V6.1** this option is also used to define (P)redis and Memcache(d) UNIX socket +* **port** _| int (default: null)_ The port +* **username** _| string (default: null)_ The username +* **password** _| string (default: null)_ The password +* **timeout** _| int (default: null)_ The timeout (in seconds) +* **servers** _| array (default: null)_ Array of servers. Exclusive to Memcache(d) + +### Redis/Predis specific options +* **redisClient** _| \Redis (default: null)_ `[>=V7]` An optional Redis Client created outside Phpfastcache's scope. This option overrides every _Host/Authenticating_ options +* **predisClient** _| \Predis\Client (default: null)_ `[>=V7]` An optional Predis Client created outside Phpfastcache's scope. This option overrides every _Host/Authenticating_ options + +These options differs depending the driver that you are using, see **/Examples** folder for more information about these options. + +\* Drivers like _CouchBase_, _MongoDb_, _(P)redis_, _Ssdb_, etc. + diff --git a/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV4ToV5.md b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV4ToV5.md new file mode 100644 index 0000000..cfd2ee4 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV4ToV5.md @@ -0,0 +1,137 @@ +Because the V5 is not backward compatible with the V4 we will help you to migrate your code: + + +### Extending phpFastCache: + +#### :clock1: Then: +```php +namespace My\Custom\Project; +use phpFastCache\Core\phpFastCache; + +/** + * Class Cache + */ +class Cache extends phpFastCache +{ + +} +``` + +#### :alarm_clock: Now: + +```php +namespace My\Custom\Project; +use phpFastCache\Proxy\phpFastCacheAbstractProxy; + +/** + * Class Cache + */ +class Cache extends phpFastCacheAbstractProxy +{ + +} +``` + +See examples/extendedPhpFastCache.php for more informations + + + +### Get/Set uses: + +#### :clock1: Then: +```php +namespace My\Custom\Project; +use phpFastCache\Core\phpFastCache; + +$cache = phpFastCache(); +// or +$cache = __c(); + +$myCacheItem = $cache->get("myKey"); + +if($myCacheItem === null){ + $myCacheItem = database_operation(); + $cache->set("myKey", $myCacheItem, 600); +} + + +$template['myCacheItemData'] = $myCacheItem; +``` + +#### :alarm_clock: Now: + +```php +namespace My\Custom\Project; + +$config = [ + 'path' => 'An\absolute\path', +]; +$cache = CacheManager::getInstance('Files', $config); +// or +$cache = CacheManager::Files($config); + +$myCacheItem = $cache->getItem("myKey"); + +if(!$myCacheItem->isHit()){ + $myCacheItem->set(database_operation()); + $cache->save($myCacheItem); +} + +$template['myCacheItemData'] = $myCacheItem->get(); +``` + + + + + + + + + + + +### Cache clearing: + +#### :clock1: Then: +```php +namespace My\Custom\Project; +use phpFastCache\Core\phpFastCache; + +$cache = phpFastCache(); +// or +$cache = __c(); + +$cache->clean(); +``` + +#### :alarm_clock: Now: + +```php +namespace My\Custom\Project; + +$config = [ + 'path' => 'An\absolute\path', +]; +$cache = CacheManager::getInstance('Files', $config); +// or +$cache = CacheManager::Files($config); + +$myCacheItem = $cache->clear(); + +``` + + + + + + + + + + + + +### Search system: +The search system has been removed in favor of Tags features. Remember that the cache must NOT be considered as a search engine like Solr, Sphynx etc. + +See examples/tagsMethods.php for more information \ No newline at end of file diff --git a/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV5ToV6.md b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV5ToV6.md new file mode 100644 index 0000000..15a6be3 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV5ToV6.md @@ -0,0 +1,244 @@ +Because the V6 is not backward compatible with the V5, here's a guide to help you to migrate your code: + +### Existing data in cache during migration +:anger: :exclamation: If you update PhpFastCache from v5 to v6 you need to clear up the whole cache otherwise you may get this kind of error: +``` +Notice: Undefined index: e in /phpfastcache/src/phpFastCache/Core/Pool/DriverBaseTrait.php on line ... + +Fatal error: Uncaught phpFastCache\Exceptions\phpFastCacheInvalidArgumentException: $expiration must be an object implementing the DateTimeInterface in ... +``` + +### Setting up a default config + +#### :clock1: Then: +PhpFastCache used to set a default global config using the `CacheManager::setup()` method + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::setup([ + 'path' => 'somewhere' +]); +$instance = CacheManager::getInstance('Files'); + +``` + +#### :alarm_clock: Now: +This method has been changed is now replaced by the `CacheManager::setDefaultConfig()` method. +Using the old `CacheManager::setup()` method will trigger a `phpFastCacheInvalidConfigurationException` + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::setDefaultConfig([ + 'path' => 'somewhere' +]); +$instance = CacheManager::getInstance('Files'); + +``` + +### Type hint of Driver instances + +#### :clock1: Then: +Driver instances used to implements a `phpFastCache\Cache\ExtendedCacheItemPoolInterface` interface. + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); + +if($instance instanceof \phpFastCache\Cache\ExtendedCacheItemPoolInterface) +{ + // Some code +} + +``` + +#### :alarm_clock: Now: +This has been changed and they now implements a `phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface` interface + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); + +if($instance instanceof \phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface) +{ + // Some code +} + +``` + +### Type hint of Item instances + +#### :clock1: Then: +Item instances used to implements a ``phpFastCache\Cache\ExtendedCacheItemInterface`` interface. + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); +$item = $instance->getItem('key'); + + +if($item instanceof \phpFastCache\Cache\ExtendedCacheItemInterface) +{ + // Some code +} + +``` + +#### :alarm_clock: Now: +This has been changed and it now returns a `phpFastCache\Core\Item\ExtendedCacheItemInterface` interface + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); +$item = $instance->getItem('key'); + + +if($item instanceof \phpFastCache\Core\Item\ExtendedCacheItemInterface) +{ + // Some code +} + +``` + +### Catching \InvalidArgumentException + +#### :clock1: Then: +Code used to catch a `\InvalidArgumentException` interface. + +```php +namespace My\Custom\Project; + +$instance = CacheManager::getInstance('Files'); + +try{ + $item = $instance->getItem(array()); +}catch(\InvalidArgumentException $e){ + //Catched exception code +} + +``` + +#### :alarm_clock: Now: +This has been changed you now MUST catch `\phpFastCache\Exceptions\phpFastCacheInvalidArgumentException` class + +```php +namespace My\Custom\Project; + +$instance = CacheManager::getInstance('Files'); + +try{ + $item = $instance->getItem(array()); +}catch(\phpFastCache\Exceptions\phpFastCacheInvalidArgumentException $e){ + //Catched exception code +} + +``` +:warning: Please note that `\phpFastCache\Exceptions\phpFastCacheInvalidArgumentException` implements `\Psr\Cache\InvalidArgumentException` as per PSR-6. + +### Catching \LogicException + +#### :clock1: Then: +Code used to catch a `\LogicException`. + +```php +namespace My\Custom\Project; + +$instance = CacheManager::getInstance('Files'); + +try{ + $item = $instance->getItem(array()); +}catch(\LogicException $e){ + //Catched exception code +} + +``` + +#### :alarm_clock: Now: +This has been changed you now MUST catch `\phpFastCache\Exceptions\phpFastCacheLogicException` interface + +```php +namespace My\Custom\Project; + +$instance = CacheManager::getInstance('Files'); + +try{ + $item = $instance->getItem(array()); +}catch(\phpFastCache\Exceptions\phpFastCacheLogicException $e){ + //Catched exception code +} + +``` + +### Allowed characters in key identifier +:warning: As of the V6, the following characters can not longer being a part of the key identifier: `{}()/\@:` + +If you try to do so, an `\phpFastCache\Exceptions\phpFastCacheInvalidArgumentException` will be raised. + +You must replace them with a safe delimiter such as `.|-_` + +### Cache clear method +The deprecated method `phpFastCache\Cache\ExtendedCacheItemPoolInterface::clear()` is now definitely removed. + + +#### :clock1: Then: +In the V5 the method `phpFastCache\Cache\ExtendedCacheItemPoolInterface::clear()` was deprecated. + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); + +if($instance instanceof \phpFastCache\Cache\ExtendedCacheItemPoolInterface) +{ + $instance->clear(); +} + +``` + +#### :alarm_clock: Now: +In the V6 we removed it. Use `phpFastCache\Cache\ExtendedCacheItemPoolInterface::clean()` instead. + +```php +namespace My\Custom\Project; + + +$instance = CacheManager::getInstance('Files'); + +if($instance instanceof \phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface) +{ + $instance->clean(); +} + +``` + +### Mongodb driver has changed +:warning: As of the V6, the Mongodb driver has been updated + +#### :clock1: Then: +In the V5 the driver was making use of of the [deprecated class Mongo](http://php.net/manual/fr/class.mongo.php). + +#### :alarm_clock: Now: +In the V6 we made an important change: We now make use of [Mongodb Driver](http://php.net/manual/fr/set.mongodb.php) +Only your code configuration will have to be updated, PhpFastCache manages all the abstract part by itself. + +### DriverStatistic class name has changed +:warning: As of the V6, DriverStatistic class name has changed for a better classes name normalization + +#### :clock1: Then: +In the V5 the class was named `phpFastCache\Entities\driverStatistic` + +#### :alarm_clock: Now: +In the V6 it has changed and is now `phpFastCache\Entities\DriverStatistic` (with a **D** uppercase), you may need to re-fetch your +git repository completely on some operating systems (especially Windows, meh). \ No newline at end of file diff --git a/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV6ToV7.md b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV6ToV7.md new file mode 100644 index 0000000..97992b1 --- /dev/null +++ b/system/vendor/phpfastcache/phpfastcache/docs/migration/MigratingFromV6ToV7.md @@ -0,0 +1,169 @@ +Because the V7 is **absolutely** not backward compatible with the V6, here's a guide to help you to migrate your code: + +### :warning: Phpfastcache global namespace :warning: +As of the V7 and to comply with modern standards the Phpfastcache namespace has changed :warning: + +#### :clock1: Then: +We used to declare this namespace: `namespace phpFastCache;` or `use phpFastCache\...;` + +#### :alarm_clock: Now: +The time has changed, you now have to use: `namespace Phpfastcache;` or `use Phpfastcache\...;` +For any useful purpose, the `src/` directory has been moved along to `lib/`. + +### :warning: Phpfastcache "phpFastCache*" classes :warning: +As of the V7 and to comply with modern standards the "phpFastCache*" classes have been **C**apitalized :warning: + +#### :clock1: Then: +We used to declare this kind of class: `class phpFastCacheAbstractProxy` + +#### :alarm_clock: Now: +The time has changed, you now have to use: `class PhpfastcacheAbstractProxy` +For any useful purpose, all the PhpFastCache exceptions has been **C**apitalized. +Class `Phpfastcache\Exceptions\phpFastCache[...]Exception` have been renamed to `Phpfastcache\Exceptions\Phpfastcache[...]Exception` + +### Deprecations +- `Phpfastcache\CacheManager::getStaticAllDrivers()` replaced by `Phpfastcache\CacheManager::getDriverList()` +- `Phpfastcache\CacheManager::getStaticSystemDrivers()` replaced by `Phpfastcache\CacheManager::getDriverList()` +- Configuration option `ignoreSymfonyNotice` will not be replaced since that the related Symfony notice in `Phpfastcache\CacheManager::getInstance()` has been removed + +### Configuration +- Added configuration option `fallbackConfig` for a better fallback configuration + +### Return type & Scalar type declarations +:anger: :exclamation: The V7 will make use of new php's return type & scalars type declarations features. +This means that you will now have to be very careful about the data types that you are sending to the phpFastCache API. +Also PhpFastCache will make use of **strict types** provided by php7 by declaring `declare(strict_types=1);` in the top of each source file. +This ensure you a full compatibility and respect of php types. + +### ActOnAll Helper + +#### :clock1: Then: +The ActOnAll helper used to return an array of returns only for getters and a strict boolean of CRUD operations: +( + Files::DeleteItem(): false + + Memcache::DeleteItem(): true + + Redis::DeleteItem(): true +) => Returning a strict FALSE + +#### :alarm_clock: Now: +Whatever you call will now result in an array of returns giving you the possibility to know which driver is returning an unexpected response via the ActOnAll helper. +Also the ActOnAll helper does no longer implements `ExtendedCacheItemPoolInterface` due to the type hint implementation. + +### Cache Manager: Instance ID +:new: As of the V7 you can now (optionally) specify an instance ID using the CacheManager: + +```php +CacheManager::getInstance($defaultDriver, $options, $instanceId); +``` +Please note that `$instanceId` must be a valid __STRING__. + +There's also a variant that throw a `phpFastCacheInstanceNotFoundException` if the instance is not found. +```php +CacheManager::getInstanceById($instanceId); +``` + +### Configuration option names + +#### :clock1: Then: +Some configuration names were still using "snake case" format: +- default_chmod +- compress_data +- sasl_user +- ... + +#### :alarm_clock: Now: +These configuration names are now "Camelized": +- defaultChmod +- compressData +- saslUser +- ... + +As of the V7 there's no "snake case" names left. + +### Configuration option type + +#### :clock1: Then: +The configuration data used to be a primitive array passed through a `CacheManager` method. + +#### :alarm_clock: Now: +The will now accept only a `\Phpfastcache\Config\ConfigurationOption` object. +There's a short alias available for less verbose configuration: `\Phpfastcache\Config\Config` +This object will contain fluent setters allowing you to make use of chained setters. +Despite the fact that this is a bad practice, this object which implements ArrayAccess interface +will allow you to treat the object as an array for primitive variable accesses: +```php +use Phpfastcache\Config\Config; + +$configArray = []; +$config = new Config(); +$config['path'] = '/an/absolute/path'; +// The line above is doing exact same job as the line below: +$config->setPath('/an/absolute/path'); +$cacheInstace = CacheManager::getInstance('Files', $config); +// This also works well: +$cacheInstace = CacheManager::getInstance('Files', new Config([ + 'path' => '/an/absolute/path'] +)); +``` +#### For non-global option you MUST use the specific Config object provided for each drivers +```php +// The recommanded way is to use an alias to not confuse yourself +use Phpfastcache\Drivers\Files\Config as FilesConfig; + +$config = new FilesConfig(); +$config->setPath('/an/absolute/path'); +$config->setSecureFileManipulation(true); +$cacheInstace = CacheManager::getInstance('Files', $config); + +// This also works well: +$cacheInstace = CacheManager::getInstance('Files', new FilesConfig([ + 'path' => '/an/absolute/path'] +)); +``` + +However the ArrayAccess interface has been implemented to make the migration easier, +so we might reconsider it's usefulness in the future. +Then, we recommend you to use the standard object syntax to ensure you a better compatibility. +Please note that the `CacheManager` will still accepts a primitive array but will raise a +E_USER_DEPRECATED error if you do so. + +### Cache manager default configuration + +#### :clock1: Then: +The previous deprecated `CacheManager::setup()` method was kept until V6. +It has been definitely removed as of the V7. + +#### :alarm_clock: Now: +Use the recommended `CacheManager::setDefaultConfig()` method instead + +### Invalid configuration keys/values + +#### :clock1: Then: +PhpFastCache ignored invalid configuration Key/value. + +#### :alarm_clock: Now: +PhpFastCache will now throws a `phpFastCacheInvalidConfigurationException` if you +attempt to make use of an invalid configuration Key/value. + +### API changelog + +#### :clock1: Then: +The API changelog used to be hardcoded as a HEREDOC in the `Api::getChangelog()` method. + +#### :alarm_clock: Now: +The API changelog format has been moved to a MarDown file (.md) +If you were using `Api::getChangelog()` you may need to check that your code is still working as expected. +The method still returns a valid string but its format has changed slightly. + +### Couchbase PHP SDK +The Couchbase driver has been updated to works with PHP SDK 2.4+ (Couchbase Server 5+). +Therefore it way requires a Couchbase Server updated combined with an SDK update. + +### Constants autoload-related +As of the V7, all the constant starting by _PFC\_*_ were moved in to the `Phpfastcache\Autoload` namespace\ +to not pollute php's root namespace. + +### Autoload mechanism +Although we highly recommend you to make use of composer benefits, it's however still possible\ +to use our own standalone autoloader. It is now located in `lib/autoload` + diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Api.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Api.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Api.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Api.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Autoload/Autoload.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Autoload/Autoload.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Autoload/Autoload.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Autoload/Autoload.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php similarity index 88% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php index 4a76970..cecfdd5 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php @@ -109,13 +109,13 @@ class ConfigurationOption extends ArrayObject implements ConfigurationOptionInte * Detect unwanted keys and throw an exception. * No more kidding now, it's 21th century. */ - /*if (\array_diff_key($array, \get_object_vars($this))) { + if (\array_diff_key($array, \get_object_vars($this))) { throw new PhpfastcacheInvalidConfigurationException(\sprintf( 'Invalid option(s) for the config %s: %s', static::class, \implode(', ', \array_keys(\array_diff_key($array, \get_object_vars($this)))) )); - }*/ + } foreach (\get_object_vars($this) as $property => $value) { @@ -142,14 +142,24 @@ class ConfigurationOption extends ArrayObject implements ConfigurationOptionInte $typeHintGot = \is_object($value) ? \get_class($value) : \gettype($value); $reflectionMethod = new \ReflectionMethod($this, $method); $parameter = $reflectionMethod->getParameters()[0] ?? null; - $typeHintExpected = ($parameter instanceof \ReflectionParameter ? ($parameter->getType() === 'object' ? $parameter->getClass() : $parameter->getType()) : 'Unknown type'); - - throw new PhpfastcacheInvalidConfigurationException(\sprintf( - 'Invalid type hint found for "%s", expected "%s" got "%s"', - \lcfirst(\substr($method, 3)), - $typeHintExpected, - $typeHintGot - )); + $paraReflectionType = $parameter->getType(); + if(method_exists($paraReflectionType, "getName")) { + $typeHintExpected = ($parameter instanceof \ReflectionParameter ? ($paraReflectionType->getName() === 'object' ? $parameter->getClass() : $paraReflectionType->getName()) : 'Unknown type'); + throw new PhpfastcacheInvalidConfigurationException(\sprintf( + 'Invalid type hint found for "%s", expected "%s" got "%s"', + \lcfirst(\substr($method, 3)), + $typeHintExpected, + $typeHintGot + )); + } else { + $typeHintExpected = ($parameter instanceof \ReflectionParameter ? ($paraReflectionType === 'object' ? $parameter->getClass() : $paraReflectionType) : 'Unknown type'); + throw new PhpfastcacheInvalidConfigurationException(\sprintf( + 'Invalid type hint found for "%s", expected "%s" got "%s"', + \lcfirst(\substr($method, 3)), + $typeHintExpected, + $typeHintGot + )); + } } } } @@ -447,4 +457,4 @@ class ConfigurationOption extends ArrayObject implements ConfigurationOptionInte $this->cacheSlamsTimeout = $cacheSlamsTimeout; return $this; } -} \ No newline at end of file +} diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOptionInterface.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOptionInterface.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOptionInterface.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOptionInterface.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/IOConfigurationOptionTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/IOConfigurationOptionTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Config/IOConfigurationOptionTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/IOConfigurationOptionTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ExtendedCacheItemInterface.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ExtendedCacheItemInterface.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ExtendedCacheItemInterface.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ExtendedCacheItemInterface.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemBaseTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemBaseTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemBaseTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemBaseTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Item/ItemExtendedTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/AbstractDriverPoolTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/AbstractDriverPoolTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/AbstractDriverPoolTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/AbstractDriverPoolTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php similarity index 95% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php index 53e3b91..f0d0567 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/DriverBaseTrait.php @@ -129,12 +129,7 @@ trait DriverBaseTrait */ protected function encode($data): string { - if (function_exists('igbinary_serialize')) { - return igbinary_serialize($data); - } else { - return \serialize($data); - } - //return \serialize($data); + return \serialize($data); } /** @@ -146,12 +141,7 @@ trait DriverBaseTrait */ protected function decode($value) { - if (function_exists('igbinary_serialize')) { - return igbinary_unserialize($value); - } else { - return \unserialize($value); - } - //return \unserialize((string)$value); + return \unserialize((string)$value); } /** diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolInterface.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/ExtendedCacheItemPoolTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php similarity index 99% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php index ce92ec0..b16b706 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Core/Pool/IO/IOHelperTrait.php @@ -256,7 +256,7 @@ HTACCESS; protected function readfile($file): string { if (\function_exists('file_get_contents')) { - return \file_get_contents($file); + return (string) \file_get_contents($file); } $string = ''; diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php similarity index 98% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php index 2c7edf9..eee8f4b 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Driver.php @@ -117,7 +117,7 @@ class Driver implements ExtendedCacheItemPoolInterface */ protected function driverClear(): bool { - return @apc_clear_cache() && @apc_clear_cache('user'); + return @apc_clear_cache() || @apc_clear_cache('user'); } /******************** diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apc/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Apcu/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cassandra/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php similarity index 99% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php index bf2d10b..7ce84ad 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Driver.php @@ -49,7 +49,7 @@ class Driver implements ExtendedCacheItemPoolInterface */ protected function driverConnect(): bool { - return !(!\array_key_exists('phpFastCache', $_COOKIE) && !@setcookie('phpFastCache', 1, 10)); + return !(!\array_key_exists('phpFastCache', $_COOKIE) && !@setcookie('phpFastCache', '1', 10)); } /** diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Cookie/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbase/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php similarity index 96% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php index 9c731c0..a8a8082 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Driver.php @@ -93,7 +93,7 @@ class Driver implements ExtendedCacheItemPoolInterface try { $response = $this->instance->findDocument($item->getEncodedKey()); } catch (CouchDBException $e) { - throw new PhpfastcacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), null, $e); + throw new PhpfastcacheDriverException('Got error while trying to get a document: ' . $e->getMessage(), 0, $e); } if ($response->status === 404 || empty($response->body['data'])) { @@ -124,7 +124,7 @@ class Driver implements ExtendedCacheItemPoolInterface $this->instance->putDocument(['data' => $this->encode($this->driverPreWrap($item))], $item->getEncodedKey(), $this->getLatestDocumentRevision($item->getEncodedKey())); } catch (CouchDBException $e) { - throw new PhpfastcacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), null, $e); + throw new PhpfastcacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), 0, $e); } return true; } @@ -147,7 +147,7 @@ class Driver implements ExtendedCacheItemPoolInterface try { $this->instance->deleteDocument($item->getEncodedKey(), $this->getLatestDocumentRevision($item->getEncodedKey())); } catch (CouchDBException $e) { - throw new PhpfastcacheDriverException('Got error while trying to delete a document: ' . $e->getMessage(), null, $e); + throw new PhpfastcacheDriverException('Got error while trying to delete a document: ' . $e->getMessage(), 0, $e); } return true; } @@ -165,7 +165,7 @@ class Driver implements ExtendedCacheItemPoolInterface $this->instance->deleteDatabase($this->getDatabaseName()); $this->createDatabase(); } catch (CouchDBException $e) { - throw new PhpfastcacheDriverException('Got error while trying to delete and recreate the database: ' . $e->getMessage(), null, $e); + throw new PhpfastcacheDriverException('Got error while trying to delete and recreate the database: ' . $e->getMessage(), 0, $e); } return true; @@ -241,4 +241,4 @@ HELP; ->setData(\implode(', ', \array_keys($this->itemInstances))) ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData."); } -} \ No newline at end of file +} diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchdb/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devfalse/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devnull/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Devtrue/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Leveldb/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php similarity index 95% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php index a7e1c74..140ceca 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Driver.php @@ -194,9 +194,9 @@ class Driver implements ExtendedCacheItemPoolInterface public function getStats(): DriverStatistic { $stats = current($this->instance->getStats()); - $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0); - $stats['version'] = (isset($stats['version']) ? $stats['version'] : $this->instance->getVersion()); - $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0); + $stats['uptime'] = $stats['uptime'] ?? 0; + $stats['version'] = $stats['version'] ?? $this->instance->getVersion(); + $stats['bytes'] = $stats['bytes'] ?? 0; $date = (new \DateTime())->setTimestamp(\time() - $stats['uptime']); diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcached/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memstatic/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php similarity index 95% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php index a78ce42..a9dd6a4 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Driver.php @@ -132,7 +132,7 @@ class Driver implements ExtendedCacheItemPoolInterface ['upsert' => true, 'multiple' => false] ); } catch (MongoDBException $e) { - throw new PhpfastcacheDriverException('Got an exception while trying to write data to MongoDB server', null, $e); + throw new PhpfastcacheDriverException('Got an exception while trying to write data to MongoDB server', 0, $e); } return isset($result['ok']) ? $result['ok'] == 1 : true; @@ -228,28 +228,29 @@ class Driver implements ExtendedCacheItemPoolInterface $servers = $this->getConfig()->getServers(); $options = $this->getConfig()->getOptions(); + $protocol = $this->getConfig()->getProtocol(); $host = $this->getConfig()->getHost(); $port = $this->getConfig()->getPort(); $username = $this->getConfig()->getUsername(); $password = $this->getConfig()->getPassword(); if( \count($servers) > 0 ){ - $host = \array_reduce($servers, function($carry, $data){ + $host = \array_reduce($servers, static function($carry, $data){ $carry .= ($carry === '' ? '' : ',').$data['host'].':'.$data['port']; return $carry; }, ''); $port = false; } - return implode('', [ - 'mongodb://', - ($username ?: ''), - ($password ? ":{$password}" : ''), - ($username ? '@' : ''), + return \implode('', [ + "{$protocol}://", + $username ?: '', + $password ? ":{$password}" : '', + $username ? '@' : '', $host, - ($port !== 27017 && $port !== false ? ":{$port}" : ''), - ($databaseName ? "/{$databaseName}" : ''), - (\count($options) > 0 ? '?'.\http_build_query($options) : ''), + $port !== 27017 && $port !== false ? ":{$port}" : '', + $databaseName ? "/{$databaseName}" : '', + \count($options) > 0 ? '?'.\http_build_query($options) : '', ]); } diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Mongodb/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php similarity index 97% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php index 98fb496..86a35a0 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Driver.php @@ -81,7 +81,8 @@ class Driver implements ExtendedCacheItemPoolInterface if (!empty($this->getConfig()->getPath())) { $this->instance = new PredisClient([ - 'scheme' => 'unix', + 'scheme' => $this->getConfig()->getScheme(), + 'persistent' => $this->getConfig()->isPersistent(), 'timeout' => $this->getConfig()->getTimeout(), 'path' => $this->getConfig()->getPath(), ], $options); diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Predis/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php similarity index 96% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php index 311e860..ed21d71 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Driver.php @@ -85,10 +85,9 @@ class Driver implements ExtendedCacheItemPoolInterface $this->instance->setOption(RedisClient::OPT_PREFIX, $this->getConfig()->getOptPrefix()); } - if (!$this->getConfig()->getPath()) { - if ($this->getConfig()->getPassword() && !$this->instance->auth($this->getConfig()->getPassword())) { - return false; - } + + if ($this->getConfig()->getPassword() && !$this->instance->auth($this->getConfig()->getPassword())) { + return false; } if ($this->getConfig()->getDatabase() !== null) { diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Redis/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php similarity index 99% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php index 2c15a62..00f5c76 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Driver.php @@ -145,7 +145,7 @@ class Driver implements ExtendedCacheItemPoolInterface return (new DriverStatistic()) ->setData(\implode(', ', \array_keys($this->itemInstances))) ->setRawData($info) - ->setSize(false) + ->setSize(0) ->setInfo('Riak does not provide size/date information att all :('); } -} \ No newline at end of file +} diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Riak/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php similarity index 93% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php index ec8353c..dc48144 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Driver.php @@ -100,7 +100,7 @@ class Driver implements ExtendedCacheItemPoolInterface * Check for Cross-Driver type confusion */ if ($item instanceof Item) { - return $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl()); + return (bool) $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl()); } throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); @@ -117,7 +117,7 @@ class Driver implements ExtendedCacheItemPoolInterface * Check for Cross-Driver type confusion */ if ($item instanceof Item) { - return $this->instance->del($item->getEncodedKey()); + return (bool) $this->instance->del($item->getEncodedKey()); } throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected'); @@ -128,7 +128,7 @@ class Driver implements ExtendedCacheItemPoolInterface */ protected function driverClear(): bool { - return $this->instance->flushdb('kv'); + return (bool) $this->instance->flushdb('kv'); } /******************** @@ -156,4 +156,4 @@ class Driver implements ExtendedCacheItemPoolInterface return $stat; } -} \ No newline at end of file +} diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Ssdb/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Wincache/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Xcache/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zenddisk/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Driver.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Driver.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Driver.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Driver.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Item.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Item.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Item.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Zendshm/Item.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/DriverStatistic.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/DriverStatistic.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/DriverStatistic.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/DriverStatistic.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/ItemBatch.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/ItemBatch.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/ItemBatch.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Entities/ItemBatch.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Event/EventInterface.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Event/EventInterface.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Event/EventInterface.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Event/EventInterface.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/EventManager.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/EventManager.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/EventManager.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/EventManager.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheCoreException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheCoreException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheCoreException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheCoreException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDeprecatedException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDeprecatedException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDeprecatedException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDeprecatedException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverCheckException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverCheckException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverCheckException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverCheckException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverConnectException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverConnectException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverConnectException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverConnectException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverNotFoundException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverNotFoundException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverNotFoundException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheDriverNotFoundException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheExceptionInterface.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheExceptionInterface.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheExceptionInterface.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheExceptionInterface.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInstanceNotFoundException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInstanceNotFoundException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInstanceNotFoundException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInstanceNotFoundException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentTypeException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentTypeException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentTypeException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidArgumentTypeException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidConfigurationException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidConfigurationException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidConfigurationException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheInvalidConfigurationException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheLogicException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheLogicException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheLogicException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheLogicException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheRootException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheSimpleCacheException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheSimpleCacheException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheSimpleCacheException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheSimpleCacheException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheUnsupportedOperationException.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheUnsupportedOperationException.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheUnsupportedOperationException.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheUnsupportedOperationException.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php similarity index 97% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php index 298597a..018fbe9 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/ActOnAll.php @@ -35,10 +35,12 @@ class ActOnAll protected $instances = []; /** + * @deprecated as of 7.1.1 will be removed in 8.x (Replaced by Cluster Aggregation feature) * ActOnAll constructor. */ public function __construct() { + @\trigger_error(\sprintf('Class "%s" is deprecated and will be removed in the next major release (8.x).', static::class), \E_USER_DEPRECATED); $this->instances =& CacheManager::getInternalInstances(); } diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/CacheConditionalHelper.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/CacheConditionalHelper.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/CacheConditionalHelper.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/CacheConditionalHelper.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php similarity index 90% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php index c69a0a0..e2fa5a7 100644 --- a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php +++ b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/Psr16Adapter.php @@ -69,14 +69,14 @@ class Psr16Adapter implements CacheInterface return $default; } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } /** * @param string $key * @param mixed $value - * @param null $ttl + * @param null|int|\DateInterval $ttl * @return bool * @throws \Phpfastcache\Exceptions\PhpfastcacheSimpleCacheException */ @@ -93,7 +93,7 @@ class Psr16Adapter implements CacheInterface } return $this->internalCacheInstance->save($cacheItem); } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -107,7 +107,7 @@ class Psr16Adapter implements CacheInterface try { return $this->internalCacheInstance->deleteItem($key); } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -120,7 +120,7 @@ class Psr16Adapter implements CacheInterface try { return $this->internalCacheInstance->clear(); } catch (PhpfastcacheRootException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -132,12 +132,15 @@ class Psr16Adapter implements CacheInterface */ public function getMultiple($keys, $default = null) { + if ($keys instanceof \Traversable) { + $keys = \iterator_to_array($keys); + } try { return array_map(function (ExtendedCacheItemInterface $item) { return $item->get(); }, $this->internalCacheInstance->getItems($keys)); } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -163,7 +166,7 @@ class Psr16Adapter implements CacheInterface } return $this->internalCacheInstance->commit(); } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -175,9 +178,15 @@ class Psr16Adapter implements CacheInterface public function deleteMultiple($keys): bool { try { - return $this->internalCacheInstance->deleteItems($keys); + if ($keys instanceof \Traversable) { + return $this->internalCacheInstance->deleteItems(\iterator_to_array($keys)); + } elseif (is_array($keys)) { + return $this->internalCacheInstance->deleteItems($keys); + } else { + throw new phpFastCacheInvalidArgumentException('$keys must be an array/Traversable instance.'); + } } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } @@ -192,7 +201,7 @@ class Psr16Adapter implements CacheInterface $cacheItem = $this->internalCacheInstance->getItem($key); return $cacheItem->isHit() && !$cacheItem->isExpired(); } catch (PhpfastcacheInvalidArgumentException $e) { - throw new PhpfastcacheSimpleCacheException($e->getMessage(), null, $e); + throw new PhpfastcacheSimpleCacheException($e->getMessage(), 0, $e); } } diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/TestHelper.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/TestHelper.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/TestHelper.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Helper/TestHelper.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Proxy/PhpfastcacheAbstractProxy.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Proxy/PhpfastcacheAbstractProxy.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Proxy/PhpfastcacheAbstractProxy.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Proxy/PhpfastcacheAbstractProxy.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ArrayObject.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ArrayObject.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ArrayObject.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ArrayObject.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/Directory.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/Directory.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/Directory.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/Directory.php diff --git a/system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/MemcacheDriverCollisionDetectorTrait.php b/system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/MemcacheDriverCollisionDetectorTrait.php similarity index 100% rename from system/caches/Phpfastcache/phpfastcache/phpfastcache/lib/Phpfastcache/Util/MemcacheDriverCollisionDetectorTrait.php rename to system/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/MemcacheDriverCollisionDetectorTrait.php diff --git a/system/caches/Phpfastcache/psr/cache/CHANGELOG.md b/system/vendor/psr/cache/CHANGELOG.md similarity index 100% rename from system/caches/Phpfastcache/psr/cache/CHANGELOG.md rename to system/vendor/psr/cache/CHANGELOG.md diff --git a/system/caches/Phpfastcache/psr/cache/LICENSE.txt b/system/vendor/psr/cache/LICENSE.txt similarity index 100% rename from system/caches/Phpfastcache/psr/cache/LICENSE.txt rename to system/vendor/psr/cache/LICENSE.txt diff --git a/system/caches/Phpfastcache/psr/cache/README.md b/system/vendor/psr/cache/README.md similarity index 100% rename from system/caches/Phpfastcache/psr/cache/README.md rename to system/vendor/psr/cache/README.md diff --git a/system/caches/Phpfastcache/psr/cache/composer.json b/system/vendor/psr/cache/composer.json similarity index 100% rename from system/caches/Phpfastcache/psr/cache/composer.json rename to system/vendor/psr/cache/composer.json diff --git a/system/caches/Phpfastcache/psr/cache/src/CacheException.php b/system/vendor/psr/cache/src/CacheException.php similarity index 100% rename from system/caches/Phpfastcache/psr/cache/src/CacheException.php rename to system/vendor/psr/cache/src/CacheException.php diff --git a/system/caches/Phpfastcache/psr/cache/src/CacheItemInterface.php b/system/vendor/psr/cache/src/CacheItemInterface.php similarity index 100% rename from system/caches/Phpfastcache/psr/cache/src/CacheItemInterface.php rename to system/vendor/psr/cache/src/CacheItemInterface.php diff --git a/system/caches/Phpfastcache/psr/cache/src/CacheItemPoolInterface.php b/system/vendor/psr/cache/src/CacheItemPoolInterface.php similarity index 100% rename from system/caches/Phpfastcache/psr/cache/src/CacheItemPoolInterface.php rename to system/vendor/psr/cache/src/CacheItemPoolInterface.php diff --git a/system/caches/Phpfastcache/psr/cache/src/InvalidArgumentException.php b/system/vendor/psr/cache/src/InvalidArgumentException.php similarity index 100% rename from system/caches/Phpfastcache/psr/cache/src/InvalidArgumentException.php rename to system/vendor/psr/cache/src/InvalidArgumentException.php diff --git a/system/caches/Phpfastcache/psr/simple-cache/.editorconfig b/system/vendor/psr/simple-cache/.editorconfig similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/.editorconfig rename to system/vendor/psr/simple-cache/.editorconfig diff --git a/system/caches/Phpfastcache/psr/simple-cache/LICENSE.md b/system/vendor/psr/simple-cache/LICENSE.md similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/LICENSE.md rename to system/vendor/psr/simple-cache/LICENSE.md diff --git a/system/caches/Phpfastcache/psr/simple-cache/README.md b/system/vendor/psr/simple-cache/README.md similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/README.md rename to system/vendor/psr/simple-cache/README.md diff --git a/system/caches/Phpfastcache/psr/simple-cache/composer.json b/system/vendor/psr/simple-cache/composer.json similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/composer.json rename to system/vendor/psr/simple-cache/composer.json diff --git a/system/caches/Phpfastcache/psr/simple-cache/src/CacheException.php b/system/vendor/psr/simple-cache/src/CacheException.php similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/src/CacheException.php rename to system/vendor/psr/simple-cache/src/CacheException.php diff --git a/system/caches/Phpfastcache/psr/simple-cache/src/CacheInterface.php b/system/vendor/psr/simple-cache/src/CacheInterface.php similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/src/CacheInterface.php rename to system/vendor/psr/simple-cache/src/CacheInterface.php diff --git a/system/caches/Phpfastcache/psr/simple-cache/src/InvalidArgumentException.php b/system/vendor/psr/simple-cache/src/InvalidArgumentException.php similarity index 100% rename from system/caches/Phpfastcache/psr/simple-cache/src/InvalidArgumentException.php rename to system/vendor/psr/simple-cache/src/InvalidArgumentException.php