From 61259d86de402e15fc21e0a93531df46f0508ba2 Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Tue, 3 Oct 2023 15:26:24 +0200 Subject: [PATCH] chore: use cms fallback classes --- composer.json | 2 +- composer.lock | 366 ++++++++++++++++++++++----- src/Kql/Interceptors/Cms/Content.php | 9 + src/Kql/Interceptors/Cms/Field.php | 9 + 4 files changed, 319 insertions(+), 67 deletions(-) create mode 100644 src/Kql/Interceptors/Cms/Content.php create mode 100644 src/Kql/Interceptors/Cms/Field.php diff --git a/composer.json b/composer.json index 3b61ab4..3764358 100755 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require": { "php": ">=8.0.0 <8.3.0", - "getkirby/cms": ">=4.0.0", + "getkirby/cms": ">=3.8.2", "getkirby/composer-installer": "^1.2.1" }, "autoload": { diff --git a/composer.lock b/composer.lock index b522b2c..c84b89c 100644 --- a/composer.lock +++ b/composer.lock @@ -8,22 +8,26 @@ "packages": [ { "name": "claviska/simpleimage", - "version": "3.7.0", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1" + "reference": "b25690f0fc25b2f0b91731370465a3b4e52ea587" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/abd15ced313c7b8041d7d73d8d2398b4f2510cf1", - "reference": "abd15ced313c7b8041d7d73d8d2398b4f2510cf1", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/b25690f0fc25b2f0b91731370465a3b4e52ea587", + "reference": "b25690f0fc25b2f0b91731370465a3b4e52ea587", "shasum": "" }, "require": { "ext-gd": "*", - "league/color-extractor": "0.3.*", - "php": ">=5.6.0" + "league/color-extractor": "0.4.*", + "php": ">=8.0" + }, + "require-dev": { + "laravel/pint": "^1.5", + "phpstan/phpstan": "^1.10" }, "type": "library", "autoload": { @@ -45,7 +49,7 @@ "description": "A PHP class that makes working with images as simple as possible.", "support": { "issues": "https://github.com/claviska/SimpleImage/issues", - "source": "https://github.com/claviska/SimpleImage/tree/3.7.0" + "source": "https://github.com/claviska/SimpleImage/tree/4.0.5" }, "funding": [ { @@ -53,7 +57,7 @@ "type": "github" } ], - "time": "2022-07-05T13:18:44+00:00" + "time": "2023-06-05T14:32:39+00:00" }, { "name": "composer/semver", @@ -138,16 +142,16 @@ }, { "name": "filp/whoops", - "version": "2.14.6", + "version": "2.15.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "f7948baaa0330277c729714910336383286305da" + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/f7948baaa0330277c729714910336383286305da", - "reference": "f7948baaa0330277c729714910336383286305da", + "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", "shasum": "" }, "require": { @@ -197,7 +201,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.6" + "source": "https://github.com/filp/whoops/tree/2.15.2" }, "funding": [ { @@ -205,24 +209,24 @@ "type": "github" } ], - "time": "2022-11-02T16:23:29+00:00" + "time": "2023-04-12T12:00:00+00:00" }, { "name": "getkirby/cms", - "version": "3.8.3", + "version": "3.9.6.1", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "41719bd54310dfc2e321a75a8549da98ccf5cd1d" + "reference": "ee2669e6dd091399fd7981381e1bd8cbd94d90a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/41719bd54310dfc2e321a75a8549da98ccf5cd1d", - "reference": "41719bd54310dfc2e321a75a8549da98ccf5cd1d", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/ee2669e6dd091399fd7981381e1bd8cbd94d90a6", + "reference": "ee2669e6dd091399fd7981381e1bd8cbd94d90a6", "shasum": "" }, "require": { - "claviska/simpleimage": "3.7.0", + "claviska/simpleimage": "4.0.5", "composer/semver": "3.3.2", "ext-ctype": "*", "ext-curl": "*", @@ -235,14 +239,15 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-simplexml": "*", - "filp/whoops": "2.14.6", + "filp/whoops": "2.15.2", "getkirby/composer-installer": "^1.2.1", "laminas/laminas-escaper": "2.12.0", "michelf/php-smartypants": "1.8.1", - "php": ">=8.0.0 <8.2.0", - "phpmailer/phpmailer": "6.6.5", - "symfony/polyfill-intl-idn": "1.26.0", - "symfony/polyfill-mbstring": "1.26.0" + "php": ">=8.0.0 <8.3.0", + "phpmailer/phpmailer": "6.8.0", + "symfony/polyfill-intl-idn": "1.27.0", + "symfony/polyfill-mbstring": "1.27.0", + "symfony/yaml": "5.4.23" }, "replace": { "symfony/polyfill-php72": "*" @@ -305,7 +310,7 @@ "type": "custom" } ], - "time": "2022-12-06T14:31:06+00:00" + "time": "2023-07-31T10:54:06+00:00" }, { "name": "getkirby/composer-installer", @@ -418,33 +423,36 @@ }, { "name": "league/color-extractor", - "version": "0.3.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/thephpleague/color-extractor.git", - "reference": "837086ec60f50c84c611c613963e4ad2e2aec806" + "reference": "21fcac6249c5ef7d00eb83e128743ee6678fe505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/color-extractor/zipball/837086ec60f50c84c611c613963e4ad2e2aec806", - "reference": "837086ec60f50c84c611c613963e4ad2e2aec806", + "url": "https://api.github.com/repos/thephpleague/color-extractor/zipball/21fcac6249c5ef7d00eb83e128743ee6678fe505", + "reference": "21fcac6249c5ef7d00eb83e128743ee6678fe505", "shasum": "" }, "require": { "ext-gd": "*", - "php": ">=5.4.0" + "php": "^7.3 || ^8.0" }, "replace": { "matthecat/colorextractor": "*" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^9.5" + }, + "suggest": { + "ext-curl": "To download images from remote URLs if allow_url_fopen is disabled for security reasons" }, "type": "library", "autoload": { "psr-4": { - "": "src" + "League\\ColorExtractor\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -470,9 +478,9 @@ ], "support": { "issues": "https://github.com/thephpleague/color-extractor/issues", - "source": "https://github.com/thephpleague/color-extractor/tree/master" + "source": "https://github.com/thephpleague/color-extractor/tree/0.4.0" }, - "time": "2016-12-15T09:30:02+00:00" + "time": "2022-09-24T15:57:16+00:00" }, { "name": "michelf/php-smartypants", @@ -530,16 +538,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.6.5", + "version": "v6.8.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "8b6386d7417526d1ea4da9edb70b8352f7543627" + "reference": "df16b615e371d81fb79e506277faea67a1be18f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/8b6386d7417526d1ea4da9edb70b8352f7543627", - "reference": "8b6386d7417526d1ea4da9edb70b8352f7543627", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/df16b615e371d81fb79e506277faea67a1be18f1", + "reference": "df16b615e371d81fb79e506277faea67a1be18f1", "shasum": "" }, "require": { @@ -549,17 +557,19 @@ "php": ">=5.5.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "doctrine/annotations": "^1.2", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "doctrine/annotations": "^1.2.6 || ^1.13.3", "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", - "yoast/phpunit-polyfills": "^1.0.0" + "squizlabs/php_codesniffer": "^3.7.1", + "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "ext-openssl": "Needed for secure SMTP sending and DKIM signing", + "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", @@ -596,7 +606,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.6.5" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.0" }, "funding": [ { @@ -604,7 +614,7 @@ "type": "github" } ], - "time": "2022-10-07T12:23:10+00:00" + "time": "2023-03-06T14:43:22+00:00" }, { "name": "psr/log", @@ -656,18 +666,167 @@ }, "time": "2021-07-14T16:46:02+00:00" }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.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": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -681,7 +840,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -725,7 +884,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -741,20 +900,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -766,7 +925,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -809,7 +968,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -825,20 +984,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -853,7 +1012,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -892,7 +1051,82 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/yaml", + "version": "v5.4.23", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.3" + }, + "require-dev": { + "symfony/console": "^5.3|^6.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.4.23" }, "funding": [ { @@ -908,7 +1142,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-04-23T19:33:36+00:00" } ], "packages-dev": [], @@ -921,5 +1155,5 @@ "php": ">=8.0.0 <8.3.0" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Kql/Interceptors/Cms/Content.php b/src/Kql/Interceptors/Cms/Content.php new file mode 100644 index 0000000..2941a6b --- /dev/null +++ b/src/Kql/Interceptors/Cms/Content.php @@ -0,0 +1,9 @@ +