From 2f325237b1bd4d3463c9bf566a4437fb9984e50f Mon Sep 17 00:00:00 2001 From: bnomei Date: Sun, 10 Jul 2022 12:04:57 +0100 Subject: [PATCH] :sparkles: content cache for files and users Signed-off-by: bnomei --- README.md | 61 ++- classes/BoostCache.php | 16 + classes/BoostFile.php | 10 + classes/BoostUser.php | 10 + classes/FileHasBoost.php | 216 +++++++++ classes/UserHasBoost.php | 216 +++++++++ composer.json | 4 +- composer.lock | 443 ++++++++---------- tests/content/home/boost.jpg | Bin 0 -> 271 bytes tests/content/home/boost.jpg.en.txt | 1 + tests/index.php | 1 + tests/site/config/config.php | 2 + tests/site/plugins/boostuser/index.php | 15 + tests/site/templates/home.php | 6 +- vendor/composer/autoload_classmap.php | 4 + vendor/composer/autoload_static.php | 4 + vendor/composer/installed.php | 26 +- vendor/composer/platform_check.php | 4 +- .../Iterator/MultiplePcreFilterIterator.php | 8 +- 19 files changed, 764 insertions(+), 283 deletions(-) create mode 100644 classes/BoostFile.php create mode 100644 classes/BoostUser.php create mode 100644 classes/FileHasBoost.php create mode 100644 classes/UserHasBoost.php create mode 100644 tests/content/home/boost.jpg create mode 100644 tests/content/home/boost.jpg.en.txt create mode 100644 tests/site/plugins/boostuser/index.php diff --git a/README.md b/README.md index 600df5d..2049ac8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Maintainability](https://flat.badgen.net/codeclimate/maintainability/bnomei/kirby3-boost)](https://codeclimate.com/github/bnomei/kirby3-boost) [![Twitter](https://flat.badgen.net/badge/twitter/bnomei?color=66d9ef)](https://twitter.com/bnomei) -Boost the speed of Kirby by having content files of pages cached, with automatic unique ID, fast lookup and Tiny-URL. +Boost the speed of Kirby by having content files of files/pages/users cached, with automatic unique ID for pages, fast lookup and Tiny-URL. ## Commercial Usage @@ -90,6 +90,40 @@ echo $count . ' Pages have been boosted.'; Congratulations! Now your project is boosted. +### User Models + +Starting with version 1.9 you can also cache the content files of user models using the respective traits/extends in your custom models via a custom plugin. + +```php +class AdminUser extends \Kirby\Cms\User +{ + use \Bnomei\UserHasBoost; +} + +Kirby::plugin('myplugin/user', [ + 'userModels' => [ + 'admin' => AdminUser::class, // admin is default role + ], +]); +``` + +### File Models + +Starting with version 1.9 you can use a setting to tell the plugin to monkey patch the core `Files` class with content cache support. You can only turn this on for all files at once since Kirby does not allow custom File models. It would need to read content file first which would defeat the purpose for a content cache anyway. + +**site/config/config.php** +```php + true, // default: false +``` + +### Easier loading of custom models, blueprints, ... + +When you use boost your project you might end up with a couple of custom models in a plugin. You can use my [autoloader helper](https://github.com/bnomei/autoloader-for-kirby) to make registering these classes a bit easier. It can also load blueprints, classes, collections, controllers, blockModels, pageModels, routes, api/routes, userModels, snippets, templates and translation files. + ## Usage ### Page from Id @@ -342,18 +376,19 @@ $boostedCount = site()->boost(); ## Settings -| bnomei.boost. | Default | Description | -|---------------------------|----------------|---------------------------| -| fieldname | `'boostid'` | change name of loaded field | -| expire | `0` | expire in minutes for all caches created | -| read | `true` | read from cache | -| write | `true` | write to cache | -| drafts | `true` | index drafts | -| fileModifiedCheck | `false` | expects file to not be altered outside of kirby | -| index.generator | callback | the uuid genertor | -| tinyurl.url | callback | returning `site()->url()`. Use htaccess on that domain to redirect `RewriteRule (.*) http://www.bnomei.com/x/$1 [R=301]` | -| tinyurl.folder | `x` | Tinyurl format: yourdomain/{folder}/{hash} | -| updateIndexWithHooks | `true` | disable this when batch creating lots of pages | +| bnomei.boost. | Default | Description | +|---------------------------|-------------|--------------------------------------------------------------------------------------------------------------------------| +| fieldname | `'boostid'` | change name of loaded field | +| expire | `0` | expire in minutes for all caches created | +| read | `true` | read from cache | +| write | `true` | write to cache | +| drafts | `true` | index drafts | +| patch.files | `false` | monkey patch Files Class to do content caching | +| fileModifiedCheck | `false` | expects file to not be altered outside of kirby | +| index.generator | callback | the uuid genertor | +| tinyurl.url | callback | returning `site()->url()`. Use htaccess on that domain to redirect `RewriteRule (.*) http://www.bnomei.com/x/$1 [R=301]` | +| tinyurl.folder | `x` | Tinyurl format: yourdomain/{folder}/{hash} | +| updateIndexWithHooks | `true` | disable this when batch creating lots of pages | ## External changes to content files diff --git a/classes/BoostCache.php b/classes/BoostCache.php index 95c4263..29fece4 100644 --- a/classes/BoostCache.php +++ b/classes/BoostCache.php @@ -10,6 +10,8 @@ use Kirby\Cache\MemoryCache; use Kirby\Cache\MemCached; use Kirby\Cache\NullCache; +use Kirby\Filesystem\F; +use Kirby\Toolkit\Str; final class BoostCache { @@ -24,6 +26,7 @@ public static function singleton(): Cache self::$singleton->flush(); } */ + self::patchFilesClass(); return self::$singleton; } @@ -127,4 +130,17 @@ public static function redis(array $options = [])//: Cache } return null; } + + public static function patchFilesClass() { + if (option('bnomei.boost.patch.files')) { + $filesClass = kirby()->roots()->kirby() . '/src/Cms/Files.php'; + if (F::exists($filesClass) && F::isWritable($filesClass)) { + $code = F::read($filesClass); + if (Str::contains($code, '\Bnomei\BoostFile::factory') === false) { + $code = str_replace('File::factory(', '\Bnomei\BoostFile::factory(', $code); + F::write($filesClass, $code); + } + } + } + } } diff --git a/classes/BoostFile.php b/classes/BoostFile.php new file mode 100644 index 0000000..506cdcb --- /dev/null +++ b/classes/BoostFile.php @@ -0,0 +1,10 @@ +findByBoostId($boostid, false)) { + $boostid = option('bnomei.boost.index.generator')(); + } + $props['content'][$fieldname] = $boostid; + } + + return parent::create($props); + } + */ + + public function checkModifiedTimestampForContentBoost(): bool + { + return option('bnomei.boost.fileModifiedCheck'); + } + + public function setBoostWillBeDeleted(bool $value): void + { + $this->boostWillBeDeleted = $value; + } + + public function hasBoost(): bool + { + return true; + } + + public function isContentBoosted(string $languageCode = null): bool + { + return $this->readContentCache($languageCode) !== null; + } + + /* + public function forceNewBoostId(bool $overwrite = false, ?string $id = null) + { + if ($overwrite || $this->boostIDField()->isEmpty()) { + $boostid = $id ?? option('bnomei.boost.index.generator')(); + // make 100% sure its unique + while (BoostIndex::singleton()->findByBoostId($boostid, false)) { + $boostid = option('bnomei.boost.index.generator')(); + } + $fieldname = option('bnomei.boost.fieldname'); + kirby()->impersonate('kirby'); + return $this->update([ + $fieldname => $boostid, + ]); + } + + return $this; + } + */ + + public function contentBoostedKey(string $languageCode = null): string + { + $key = strval(crc32($this->id())); + if (! $languageCode) { + $languageCode = kirby()->languages()->count() ? kirby()->language()->code() : null; + } + if ($languageCode) { + $key = $key . '-' . $languageCode; + } + + return $key; + } + + public function isContentCacheExpiredByModified(string $languageCode = null): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return true; + } + + $modifiedCache = $cache->get( + $this->contentBoostedKey($languageCode).'-modified', + null + ); + if (!$modifiedCache) { + return true; + } + + $modified = $this->modified(); + // in rare case the file does not exist or is not readable + if ($modified === false) { + return true; + } + // otherwise compare + if ($modifiedCache && intval($modifiedCache) < intval($modified)) { + return true; + } + + return false; + } + + public function readContentCache(string $languageCode = null): ?array + { + if ($this->checkModifiedTimestampForContentBoost()) { + if ($this->isContentCacheExpiredByModified($languageCode)) { + return null; + } + } + + return BoostCache::singleton()->get( + $this->contentBoostedKey($languageCode) . '-content', + null + ); + } + + public function readContent(string $languageCode = null): array + { + // read from boostedCache if exists + $data = option('bnomei.boost.read') === false || option('debug') ? null : $this->readContentCache($languageCode); + + // read from file and update boostedCache + if (! $data) { + $data = parent::readContent($languageCode); + if ($data && $this->boostWillBeDeleted !== true) { + $this->writeContentCache($data, $languageCode); + } + } + + return $data; + } + + public function writeContentCache(?array $data = null, string $languageCode = null): bool + { + $cache = BoostCache::singleton(); + if (! $cache || option('bnomei.boost.write') === false) { + return true; + } + + $modified = $this->modified(); + + // in rare case file does not exists or is not readable + if ($modified === false) { + return false; // try again another time + } + + $cache->set( + $this->contentBoostedKey($languageCode) . '-modified', + $modified, + option('bnomei.boost.expire') + ); + + return $cache->set( + $this->contentBoostedKey($languageCode) . '-content', + $data, + option('bnomei.boost.expire') + ); + } + + public function writeContent(array $data, string $languageCode = null): bool + { + // write to file and cache + return parent::writeContent($data, $languageCode) && + $this->writeContentCache($data, $languageCode); + } + + public function deleteContentCache(): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return true; + } + + $this->setBoostWillBeDeleted(true); + + foreach (kirby()->languages() as $language) { + $cache->remove( + $this->contentBoostedKey($language->code()) . '-content' + ); + $cache->remove( + $this->contentBoostedKey($language->code()).'-modified' + ); + } + $cache->remove( + $this->contentBoostedKey() . '-content' + ); + $cache->remove( + $this->contentBoostedKey().'-modified' + ); + + return true; + } + + public function delete(bool $force = false): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return parent::delete($force); + } + + $success = parent::delete($force); + $this->deleteContentCache(); + + return $success; + } +} diff --git a/classes/UserHasBoost.php b/classes/UserHasBoost.php new file mode 100644 index 0000000..2bbe3dd --- /dev/null +++ b/classes/UserHasBoost.php @@ -0,0 +1,216 @@ +findByBoostId($boostid, false)) { + $boostid = option('bnomei.boost.index.generator')(); + } + $props['content'][$fieldname] = $boostid; + } + + return parent::create($props); + } + */ + + public function checkModifiedTimestampForContentBoost(): bool + { + return option('bnomei.boost.fileModifiedCheck'); + } + + public function setBoostWillBeDeleted(bool $value): void + { + $this->boostWillBeDeleted = $value; + } + + public function hasBoost(): bool + { + return true; + } + + public function isContentBoosted(string $languageCode = null): bool + { + return $this->readContentCache($languageCode) !== null; + } + + /* + public function forceNewBoostId(bool $overwrite = false, ?string $id = null) + { + if ($overwrite || $this->boostIDField()->isEmpty()) { + $boostid = $id ?? option('bnomei.boost.index.generator')(); + // make 100% sure its unique + while (BoostIndex::singleton()->findByBoostId($boostid, false)) { + $boostid = option('bnomei.boost.index.generator')(); + } + $fieldname = option('bnomei.boost.fieldname'); + kirby()->impersonate('kirby'); + return $this->update([ + $fieldname => $boostid, + ]); + } + + return $this; + } + */ + + public function contentBoostedKey(string $languageCode = null): string + { + $key = strval(crc32($this->id())); + if (! $languageCode) { + $languageCode = kirby()->languages()->count() ? kirby()->language()->code() : null; + } + if ($languageCode) { + $key = $key . '-' . $languageCode; + } + + return $key; + } + + public function isContentCacheExpiredByModified(string $languageCode = null): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return true; + } + + $modifiedCache = $cache->get( + $this->contentBoostedKey($languageCode).'-modified', + null + ); + if (!$modifiedCache) { + return true; + } + + $modified = $this->modified(); + // in rare case the file does not exist or is not readable + if ($modified === false) { + return true; + } + // otherwise compare + if ($modifiedCache && intval($modifiedCache) < intval($modified)) { + return true; + } + + return false; + } + + public function readContentCache(string $languageCode = null): ?array + { + if ($this->checkModifiedTimestampForContentBoost()) { + if ($this->isContentCacheExpiredByModified($languageCode)) { + return null; + } + } + + return BoostCache::singleton()->get( + $this->contentBoostedKey($languageCode) . '-content', + null + ); + } + + public function readContent(string $languageCode = null): array + { + // read from boostedCache if exists + $data = option('bnomei.boost.read') === false || option('debug') ? null : $this->readContentCache($languageCode); + + // read from file and update boostedCache + if (! $data) { + $data = parent::readContent($languageCode); + if ($data && $this->boostWillBeDeleted !== true) { + $this->writeContentCache($data, $languageCode); + } + } + + return $data; + } + + public function writeContentCache(?array $data = null, string $languageCode = null): bool + { + $cache = BoostCache::singleton(); + if (! $cache || option('bnomei.boost.write') === false) { + return true; + } + + $modified = $this->modified(); + + // in rare case file does not exists or is not readable + if ($modified === false) { + return false; // try again another time + } + + $cache->set( + $this->contentBoostedKey($languageCode) . '-modified', + $modified, + option('bnomei.boost.expire') + ); + + return $cache->set( + $this->contentBoostedKey($languageCode) . '-content', + $data, + option('bnomei.boost.expire') + ); + } + + public function writeContent(array $data, string $languageCode = null): bool + { + // write to file and cache + return parent::writeContent($data, $languageCode) && + $this->writeContentCache($data, $languageCode); + } + + public function deleteContentCache(): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return true; + } + + $this->setBoostWillBeDeleted(true); + + foreach (kirby()->languages() as $language) { + $cache->remove( + $this->contentBoostedKey($language->code()) . '-content' + ); + $cache->remove( + $this->contentBoostedKey($language->code()).'-modified' + ); + } + $cache->remove( + $this->contentBoostedKey() . '-content' + ); + $cache->remove( + $this->contentBoostedKey().'-modified' + ); + + return true; + } + + public function delete(bool $force = false): bool + { + $cache = BoostCache::singleton(); + if (! $cache) { + return parent::delete($force); + } + + $success = parent::delete($force); + $this->deleteContentCache(); + + return $success; + } +} diff --git a/composer.json b/composer.json index 81abc6d..af0e06c 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "bnomei/kirby3-boost", "type": "kirby-plugin", - "version": "1.8.9", - "description": "Boost the speed of Kirby by having content files of pages cached, with automatic unique ID, fast lookup and Tiny-URL.", + "version": "1.9.0", + "description": "Boost the speed of Kirby by having content files of files/pages/users cached, with automatic unique ID for pages, fast lookup and Tiny-URL.", "license": "MIT", "authors": [ { diff --git a/composer.lock b/composer.lock index 164cf4c..6b3673d 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": "4f03f369ac42a63804c3d660c169bfe7", + "content-hash": "81ebdc07a8e8ba43c57424d487dc98eb", "packages": [ { "name": "bnomei/autoloader-for-kirby", @@ -198,25 +198,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -245,7 +245,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1" }, "funding": [ { @@ -261,20 +261,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/finder", - "version": "v5.4.3", + "version": "v5.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", + "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", "shasum": "" }, "require": { @@ -308,7 +308,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/finder/tree/v5.4.8" }, "funding": [ { @@ -324,20 +324,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2022-04-15T08:07:45+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -346,7 +346,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -391,7 +391,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -407,7 +407,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" } ], "packages-dev": [ @@ -603,35 +603,53 @@ }, { "name": "getkirby/cms", - "version": "3.6.5", + "version": "3.7.0.2", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "40d2ee98b51644b8eefa814c37f3b402a9fdb994" + "reference": "9e8910306678558d79ed8d7caf0f17b62d1ccd92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/40d2ee98b51644b8eefa814c37f3b402a9fdb994", - "reference": "40d2ee98b51644b8eefa814c37f3b402a9fdb994", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/9e8910306678558d79ed8d7caf0f17b62d1ccd92", + "reference": "9e8910306678558d79ed8d7caf0f17b62d1ccd92", "shasum": "" }, "require": { "claviska/simpleimage": "3.6.5", "ext-ctype": "*", + "ext-curl": "*", + "ext-dom": "*", + "ext-filter": "*", + "ext-hash": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-libxml": "*", "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", "filp/whoops": "2.14.5", "getkirby/composer-installer": "^1.2.1", "laminas/laminas-escaper": "2.10.0", "michelf/php-smartypants": "1.8.1", "php": ">=7.4.0 <8.2.0", - "phpmailer/phpmailer": "6.5.4", - "psr/log": "1.1.4", - "symfony/polyfill-intl-idn": "1.25.0", - "symfony/polyfill-mbstring": "1.25.0" + "phpmailer/phpmailer": "6.6.3", + "symfony/polyfill-intl-idn": "1.26.0", + "symfony/polyfill-mbstring": "1.26.0" }, "replace": { "symfony/polyfill-php72": "*" }, + "suggest": { + "ext-PDO": "Support for using databases", + "ext-apcu": "Support for the Apcu cache driver", + "ext-exif": "Support for exif information from images", + "ext-fileinfo": "Improved mime type detection for files", + "ext-intl": "Improved i18n number formatting", + "ext-memcached": "Support for the Memcached cache driver", + "ext-zip": "Support for ZIP archive file functions", + "ext-zlib": "Sanitization and validation for svgz files" + }, "type": "kirby-cms", "extra": { "unused": [ @@ -680,26 +698,26 @@ "type": "custom" } ], - "time": "2022-04-19T12:49:55+00:00" + "time": "2022-07-01T07:54:39+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.4.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -788,7 +806,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.4.5" }, "funding": [ { @@ -804,7 +822,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-06-20T22:16:13+00:00" }, { "name": "guzzlehttp/promises", @@ -892,16 +910,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "13388f00956b1503577598873fffb5ae994b5737" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", + "reference": "13388f00956b1503577598873fffb5ae994b5737", "shasum": "" }, "require": { @@ -925,7 +943,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -987,7 +1005,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.0" }, "funding": [ { @@ -1003,7 +1021,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-06-20T21:43:11+00:00" }, { "name": "laminas/laminas-escaper", @@ -1240,16 +1258,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -1290,9 +1308,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "phar-io/manifest", @@ -1650,16 +1668,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.5.4", + "version": "v6.6.3", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285" + "reference": "9400f305a898f194caff5521f64e5dfa926626f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285", - "reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3", + "reference": "9400f305a898f194caff5521f64e5dfa926626f3", "shasum": "" }, "require": { @@ -1671,8 +1689,8 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "doctrine/annotations": "^1.2", - "php-parallel-lint/php-console-highlighter": "^0.5.0", - "php-parallel-lint/php-parallel-lint": "^1.3.1", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.6.2", @@ -1716,7 +1734,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3" }, "funding": [ { @@ -1724,7 +1742,7 @@ "type": "github" } ], - "time": "2022-02-17T08:19:04+00:00" + "time": "2022-06-20T09:21:02+00:00" }, { "name": "phpspec/prophecy", @@ -2113,16 +2131,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.20", + "version": "9.5.21", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", - "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", + "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", "shasum": "" }, "require": { @@ -2156,7 +2174,6 @@ "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*", "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { @@ -2200,7 +2217,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" }, "funding": [ { @@ -2212,7 +2229,7 @@ "type": "github" } ], - "time": "2022-04-01T12:37:26+00:00" + "time": "2022-06-19T12:14:25+00:00" }, { "name": "psr/container", @@ -2429,30 +2446,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", + "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2473,9 +2490,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/2.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:41:46+00:00" }, { "name": "ralouphie/getallheaders", @@ -3487,27 +3504,26 @@ }, { "name": "symfony/config", - "version": "v6.0.7", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "22850bfdd2b6090568ad05dece6843c859d933b7" + "reference": "ed8d12417bcacd2d969750feb1fe1aab1c11e613" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/22850bfdd2b6090568ad05dece6843c859d933b7", - "reference": "22850bfdd2b6090568ad05dece6843c859d933b7", + "url": "https://api.github.com/repos/symfony/config/zipball/ed8d12417bcacd2d969750feb1fe1aab1c11e613", + "reference": "ed8d12417bcacd2d969750feb1fe1aab1c11e613", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", "symfony/filesystem": "^5.4|^6.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php81": "^1.22" + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/finder": "<4.4" + "symfony/finder": "<5.4" }, "require-dev": { "symfony/event-dispatcher": "^5.4|^6.0", @@ -3545,7 +3561,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.0.7" + "source": "https://github.com/symfony/config/tree/v6.1.0" }, "funding": [ { @@ -3561,24 +3577,25 @@ "type": "tidelift" } ], - "time": "2022-03-22T16:12:04+00:00" + "time": "2022-05-17T12:56:32+00:00" }, { "name": "symfony/console", - "version": "v6.0.7", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" + "reference": "7a86c1c42fbcb69b59768504c7bca1d3767760b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", - "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "url": "https://api.github.com/repos/symfony/console/zipball/7a86c1c42fbcb69b59768504c7bca1d3767760b7", + "reference": "7a86c1c42fbcb69b59768504c7bca1d3767760b7", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^1.1|^2|^3", "symfony/string": "^5.4|^6.0" @@ -3640,7 +3657,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.7" + "source": "https://github.com/symfony/console/tree/v6.1.2" }, "funding": [ { @@ -3656,24 +3673,24 @@ "type": "tidelift" } ], - "time": "2022-03-31T17:18:25+00:00" + "time": "2022-06-26T13:01:30+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.7", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff" + "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", - "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3132d2f43ca799c2aa099f9738d98228c56baa5d", + "reference": "3132d2f43ca799c2aa099f9738d98228c56baa5d", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, @@ -3703,7 +3720,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.7" + "source": "https://github.com/symfony/filesystem/tree/v6.1.0" }, "funding": [ { @@ -3719,20 +3736,20 @@ "type": "tidelift" } ], - "time": "2022-04-01T12:54:51+00:00" + "time": "2022-05-21T13:34:40+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -3747,7 +3764,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3785,7 +3802,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -3801,20 +3818,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", "shasum": "" }, "require": { @@ -3826,7 +3843,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3866,7 +3883,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" }, "funding": [ { @@ -3882,20 +3899,20 @@ "type": "tidelift" } ], - "time": "2021-11-23T21:10:46+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", - "reference": "749045c69efb97c70d25d7463abba812e91f3a44", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { @@ -3909,7 +3926,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3953,7 +3970,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" }, "funding": [ { @@ -3969,20 +3986,20 @@ "type": "tidelift" } ], - "time": "2021-09-14T14:02:44+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", "shasum": "" }, "require": { @@ -3994,7 +4011,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4037,7 +4054,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" }, "funding": [ { @@ -4053,20 +4070,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -4081,7 +4098,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4120,86 +4137,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -4215,24 +4153,24 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.0.1", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" + "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", - "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/925e713fe8fcacf6bc05e936edd8dd5441a21239", + "reference": "925e713fe8fcacf6bc05e936edd8dd5441a21239", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/container": "^2.0" }, "conflict": { @@ -4244,7 +4182,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.1-dev" }, "thanks": { "name": "symfony/contracts", @@ -4254,7 +4192,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4281,7 +4222,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.1.1" }, "funding": [ { @@ -4297,24 +4238,24 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:10:05+00:00" + "time": "2022-05-30T19:18:58+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.0.5", + "version": "v6.1.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f2c1780607ec6502f2121d9729fd8150a655d337" + "reference": "77dedae82ce2a26e2e9b481855473fc3b3e4e54d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f2c1780607ec6502f2121d9729fd8150a655d337", - "reference": "f2c1780607ec6502f2121d9729fd8150a655d337", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/77dedae82ce2a26e2e9b481855473fc3b3e4e54d", + "reference": "77dedae82ce2a26e2e9b481855473fc3b3e4e54d", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -4343,7 +4284,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.0.5" + "source": "https://github.com/symfony/stopwatch/tree/v6.1.0" }, "funding": [ { @@ -4359,24 +4300,24 @@ "type": "tidelift" } ], - "time": "2022-02-21T17:15:17+00:00" + "time": "2022-02-25T11:15:52+00:00" }, { "name": "symfony/string", - "version": "v6.0.3", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2" + "reference": "1903f2879875280c5af944625e8246d81c2f0604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/522144f0c4c004c80d56fa47e40e17028e2eefc2", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2", + "url": "https://api.github.com/repos/symfony/string/zipball/1903f2879875280c5af944625e8246d81c2f0604", + "reference": "1903f2879875280c5af944625e8246d81c2f0604", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -4428,7 +4369,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.3" + "source": "https://github.com/symfony/string/tree/v6.1.2" }, "funding": [ { @@ -4444,24 +4385,24 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-06-26T16:35:04+00:00" }, { "name": "symfony/yaml", - "version": "v6.0.3", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e77f3ea0b21141d771d4a5655faa54f692b34af5" + "reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e77f3ea0b21141d771d4a5655faa54f692b34af5", - "reference": "e77f3ea0b21141d771d4a5655faa54f692b34af5", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b01c4e7dc6a51cbf114567af04a19789fd1011fe", + "reference": "b01c4e7dc6a51cbf114567af04a19789fd1011fe", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -4502,7 +4443,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.0.3" + "source": "https://github.com/symfony/yaml/tree/v6.1.2" }, "funding": [ { @@ -4518,7 +4459,7 @@ "type": "tidelift" } ], - "time": "2022-01-26T17:23:29+00:00" + "time": "2022-06-20T12:01:07+00:00" }, { "name": "theseer/tokenizer", @@ -4572,21 +4513,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -4624,9 +4565,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/tests/content/home/boost.jpg b/tests/content/home/boost.jpg new file mode 100644 index 0000000000000000000000000000000000000000..63fd18f008046f20df57d27629fa012dc6292513 GIT binary patch literal 271 zcmb8q%MHRX3render(); diff --git a/tests/site/config/config.php b/tests/site/config/config.php index 0c7a90a..1e176ba 100644 --- a/tests/site/config/config.php +++ b/tests/site/config/config.php @@ -4,4 +4,6 @@ 'debug' => false, // must be off for cache to stick 'languages' => true, + + 'bnomei.boost.patch.files' => true, // do the monkey patch ]; diff --git a/tests/site/plugins/boostuser/index.php b/tests/site/plugins/boostuser/index.php new file mode 100644 index 0000000..1c2d6d2 --- /dev/null +++ b/tests/site/plugins/boostuser/index.php @@ -0,0 +1,15 @@ + [ + 'admin' => AdminUser::class, // admin is default role + ], +]); diff --git a/tests/site/templates/home.php b/tests/site/templates/home.php index e7cd14a..3fffa85 100644 --- a/tests/site/templates/home.php +++ b/tests/site/templates/home.php @@ -1,3 +1,7 @@ index()->toArray())); + var_dump($page->files()->first()->description()); + + $user = kirby()->users()->first(); + var_dump($user->hello()); + var_dump($user->description()); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 538518c..523c32e 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -10,11 +10,15 @@ 'Bnomei\\Autoloader' => $vendorDir . '/bnomei/autoloader-for-kirby/classes/Autoloader.php', 'Bnomei\\Bolt' => $baseDir . '/classes/Bolt.php', 'Bnomei\\BoostCache' => $baseDir . '/classes/BoostCache.php', + 'Bnomei\\BoostFile' => $baseDir . '/classes/BoostFile.php', 'Bnomei\\BoostIndex' => $baseDir . '/classes/BoostIndex.php', 'Bnomei\\BoostPage' => $baseDir . '/classes/BoostPage.php', + 'Bnomei\\BoostUser' => $baseDir . '/classes/BoostUser.php', 'Bnomei\\CacheBenchmark' => $baseDir . '/classes/CacheBenchmark.php', + 'Bnomei\\FileHasBoost' => $baseDir . '/classes/FileHasBoost.php', 'Bnomei\\PageHasBoost' => $baseDir . '/classes/PageHasBoost.php', 'Bnomei\\TokenGenerator' => $baseDir . '/classes/TokenGenerator.php', + 'Bnomei\\UserHasBoost' => $baseDir . '/classes/UserHasBoost.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Kirby\\ComposerInstaller\\CmsInstaller' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php', 'Kirby\\ComposerInstaller\\Installer' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index c4add93..a43a386 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -54,11 +54,15 @@ class ComposerStaticInit1cf7969bd370956647ab831624668d4e 'Bnomei\\Autoloader' => __DIR__ . '/..' . '/bnomei/autoloader-for-kirby/classes/Autoloader.php', 'Bnomei\\Bolt' => __DIR__ . '/../..' . '/classes/Bolt.php', 'Bnomei\\BoostCache' => __DIR__ . '/../..' . '/classes/BoostCache.php', + 'Bnomei\\BoostFile' => __DIR__ . '/../..' . '/classes/BoostFile.php', 'Bnomei\\BoostIndex' => __DIR__ . '/../..' . '/classes/BoostIndex.php', 'Bnomei\\BoostPage' => __DIR__ . '/../..' . '/classes/BoostPage.php', + 'Bnomei\\BoostUser' => __DIR__ . '/../..' . '/classes/BoostUser.php', 'Bnomei\\CacheBenchmark' => __DIR__ . '/../..' . '/classes/CacheBenchmark.php', + 'Bnomei\\FileHasBoost' => __DIR__ . '/../..' . '/classes/FileHasBoost.php', 'Bnomei\\PageHasBoost' => __DIR__ . '/../..' . '/classes/PageHasBoost.php', 'Bnomei\\TokenGenerator' => __DIR__ . '/../..' . '/classes/TokenGenerator.php', + 'Bnomei\\UserHasBoost' => __DIR__ . '/../..' . '/classes/UserHasBoost.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Kirby\\ComposerInstaller\\CmsInstaller' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php', 'Kirby\\ComposerInstaller\\Installer' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index b6e9b4e..eaeac18 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,8 +1,8 @@ array( 'name' => 'bnomei/kirby3-boost', - 'pretty_version' => '1.8.9', - 'version' => '1.8.9.0', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'reference' => NULL, 'type' => 'kirby-plugin', 'install_path' => __DIR__ . '/../../', @@ -20,8 +20,8 @@ 'dev_requirement' => false, ), 'bnomei/kirby3-boost' => array( - 'pretty_version' => '1.8.9', - 'version' => '1.8.9.0', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'reference' => NULL, 'type' => 'kirby-plugin', 'install_path' => __DIR__ . '/../../', @@ -47,27 +47,27 @@ 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v3.0.1', - 'version' => '3.0.1.0', - 'reference' => '26954b3d62a6c5fd0ea8a2a00c0353a14978d05c', + 'pretty_version' => 'v3.1.1', + 'version' => '3.1.1.0', + 'reference' => '07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/finder' => array( - 'pretty_version' => 'v5.4.3', - 'version' => '5.4.3.0', - 'reference' => '231313534dded84c7ecaa79d14bc5da4ccb69b7d', + 'pretty_version' => 'v5.4.8', + 'version' => '5.4.8.0', + 'reference' => '9b630f3427f3ebe7cd346c277a1408b00249dad9', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.25.0', - 'version' => '1.25.0.0', - 'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c', + 'pretty_version' => 'v1.26.0', + 'version' => '1.26.0.0', + 'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), diff --git a/vendor/composer/platform_check.php b/vendor/composer/platform_check.php index b168ddd..4c3a5d6 100644 --- a/vendor/composer/platform_check.php +++ b/vendor/composer/platform_check.php @@ -4,8 +4,8 @@ $issues = array(); -if (!(PHP_VERSION_ID >= 80002)) { - $issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.'; +if (!(PHP_VERSION_ID >= 80100)) { + $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php index 9905172..564765d 100644 --- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -84,7 +84,13 @@ protected function isAccepted(string $string) */ protected function isRegex(string $str) { - if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) { + $availableModifiers = 'imsxuADU'; + + if (\PHP_VERSION_ID >= 80200) { + $availableModifiers .= 'n'; + } + + if (preg_match('/^(.{3,}?)['.$availableModifiers.']*$/', $str, $m)) { $start = substr($m[1], 0, 1); $end = substr($m[1], -1);