From 0a904482aed8b4d1b9c095e446a75e347a6ad78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Nicou=C3=A9?= Date: Sun, 12 Jan 2025 18:56:44 +0100 Subject: [PATCH] Update Composer packages --- composer.json | 6 +- composer.lock | 185 +++++++------- kirby/bootstrap.php | 4 +- kirby/composer.json | 18 +- kirby/composer.lock | 122 +++++---- kirby/config/helpers.php | 4 +- kirby/src/Cms/System.php | 4 +- kirby/src/Http/Response.php | 3 +- kirby/src/Toolkit/A.php | 2 + kirby/vendor/bin/yaml-lint | 5 +- kirby/vendor/bin/yaml-lint.bat | 5 + .../simpleimage/src/claviska/SimpleImage.php | 40 ++- kirby/vendor/composer/installed.json | 130 +++++----- kirby/vendor/composer/installed.php | 50 ++-- .../laminas/laminas-escaper/composer.json | 14 +- .../laminas/laminas-escaper/src/Escaper.php | 18 +- .../vendor/phpmailer/phpmailer/composer.json | 1 + .../phpmailer/language/phpmailer.lang-as.php | 35 +++ .../phpmailer/language/phpmailer.lang-bn.php | 35 +++ .../phpmailer/language/phpmailer.lang-da.php | 1 + .../phpmailer/language/phpmailer.lang-pl.php | 9 +- .../phpmailer/phpmailer/src/PHPMailer.php | 130 +++++++++- kirby/vendor/phpmailer/phpmailer/src/POP3.php | 2 +- kirby/vendor/phpmailer/phpmailer/src/SMTP.php | 33 ++- .../deprecation-contracts/composer.json | 4 +- .../deprecation-contracts/function.php | 2 +- .../vendor/symfony/polyfill-intl-idn/Idn.php | 20 +- .../symfony/polyfill-intl-idn/composer.json | 3 - .../symfony/polyfill-mbstring/Mbstring.php | 77 ++++-- .../symfony/polyfill-mbstring/bootstrap.php | 8 + .../symfony/polyfill-mbstring/bootstrap80.php | 8 + .../symfony/polyfill-mbstring/composer.json | 3 - .../symfony/yaml/Command/LintCommand.php | 81 +++--- kirby/vendor/symfony/yaml/Dumper.php | 16 +- .../symfony/yaml/Exception/ParseException.php | 32 +-- kirby/vendor/symfony/yaml/Inline.php | 233 +++++++++--------- kirby/vendor/symfony/yaml/Parser.php | 146 ++++------- kirby/vendor/symfony/yaml/Tag/TaggedValue.php | 8 +- kirby/vendor/symfony/yaml/Unescaper.php | 82 +++--- kirby/vendor/symfony/yaml/Yaml.php | 11 +- kirby/vendor/symfony/yaml/composer.json | 11 +- 41 files changed, 922 insertions(+), 679 deletions(-) create mode 100644 kirby/vendor/bin/yaml-lint.bat create mode 100644 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php create mode 100644 kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php diff --git a/composer.json b/composer.json index dec3734..691188c 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": ">=7.3.0 <8.1.0", - "getkirby/cms": "^3.9.3", - "sylvainjule/matomo": "^1.0.7", + "php": ">=8.1.0 <8.4.0", + "getkirby/cms": "^3.10.0", + "sylvainjule/matomo": "^2.0.0", "kirbyzone/sitemapper": "^1.2.1", "mullema/k3-image-clip": "^3.2", "wearejust/kirby-twig": "^5.0" diff --git a/composer.lock b/composer.lock index bc00fcb..e09b924 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "86ab1ddb76e0ac2a521664cc23de89c5", + "content-hash": "4d30b2c251476acb970dea1ecb02e8fb", "packages": [ { "name": "claviska/simpleimage", - "version": "4.0.6", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa" + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/969de5e61810ef91f6f83c475b192c4841367dfa", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/dfbe53c01dae8467468ef2b817c09b786a7839d2", + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2", "shasum": "" }, "require": { @@ -49,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/4.0.6" + "source": "https://github.com/claviska/SimpleImage/tree/4.2.0" }, "funding": [ { @@ -57,7 +57,7 @@ "type": "github" } ], - "time": "2023-07-27T16:48:12+00:00" + "time": "2024-04-15T16:07:16+00:00" }, { "name": "composer/semver", @@ -213,20 +213,20 @@ }, { "name": "getkirby/cms", - "version": "3.9.8.2", + "version": "3.10.1.1", "source": { "type": "git", "url": "https://github.com/getkirby/kirby.git", - "reference": "40ae4e59227684709d45b202cb96f643da8684eb" + "reference": "1953eb4979f6d05ce7779c547bf761517024cccb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getkirby/kirby/zipball/40ae4e59227684709d45b202cb96f643da8684eb", - "reference": "40ae4e59227684709d45b202cb96f643da8684eb", + "url": "https://api.github.com/repos/getkirby/kirby/zipball/1953eb4979f6d05ce7779c547bf761517024cccb", + "reference": "1953eb4979f6d05ce7779c547bf761517024cccb", "shasum": "" }, "require": { - "claviska/simpleimage": "4.0.6", + "claviska/simpleimage": "4.2.0", "composer/semver": "3.4.0", "ext-ctype": "*", "ext-curl": "*", @@ -241,13 +241,13 @@ "ext-simplexml": "*", "filp/whoops": "2.15.4", "getkirby/composer-installer": "^1.2.1", - "laminas/laminas-escaper": "2.12.0", + "laminas/laminas-escaper": "2.13.0", "michelf/php-smartypants": "1.8.1", - "php": ">=8.0.0 <8.3.0", - "phpmailer/phpmailer": "6.8.1", - "symfony/polyfill-intl-idn": "1.28.0", - "symfony/polyfill-mbstring": "1.28.0", - "symfony/yaml": "5.4.30" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "phpmailer/phpmailer": "6.9.1", + "symfony/polyfill-intl-idn": "1.30.0", + "symfony/polyfill-mbstring": "1.30.0", + "symfony/yaml": "6.4.8" }, "replace": { "symfony/polyfill-php72": "*" @@ -311,7 +311,7 @@ "type": "custom" } ], - "time": "2024-08-24T20:21:30+00:00" + "time": "2024-08-29T08:36:26+00:00" }, { "name": "getkirby/composer-installer", @@ -399,33 +399,33 @@ }, { "name": "laminas/laminas-escaper", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.26.6", - "laminas/laminas-coding-standard": "~2.4.0", + "infection/infection": "^0.27.0", + "laminas/laminas-coding-standard": "~2.5.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.5.18", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.22.0" + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" }, "type": "library", "autoload": { @@ -457,7 +457,7 @@ "type": "community_bridge" } ], - "time": "2022-10-10T10:11:09+00:00" + "time": "2023-10-10T08:35:13+00:00" }, { "name": "league/color-extractor", @@ -618,16 +618,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -647,6 +647,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "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", @@ -686,7 +687,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.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -694,7 +695,7 @@ "type": "github" } ], - "time": "2023-08-29T08:26:30+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "psr/log", @@ -748,16 +749,16 @@ }, { "name": "sylvainjule/matomo", - "version": "1.0.7", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sylvainjule/kirby-matomo.git", - "reference": "8662f8ec074369c605cb186b245a797c9bbbe68d" + "reference": "ce5da6b1427da225efe3ebc05c3a1a4d6b7781c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sylvainjule/kirby-matomo/zipball/8662f8ec074369c605cb186b245a797c9bbbe68d", - "reference": "8662f8ec074369c605cb186b245a797c9bbbe68d", + "url": "https://api.github.com/repos/sylvainjule/kirby-matomo/zipball/ce5da6b1427da225efe3ebc05c3a1a4d6b7781c2", + "reference": "ce5da6b1427da225efe3ebc05c3a1a4d6b7781c2", "shasum": "" }, "require": { @@ -775,40 +776,47 @@ { "name": "Sylvain Julé", "email": "contact@sylvain-jule.fr" + }, + { + "name": "Sören Engels" + }, + { + "name": "Philipp Trenz", + "email": "mail@philipptrenz.de" } ], - "description": "Matomo helpers and panel sections for Kirby", + "description": "Matomo helpers, panel area and sections for Kirby", "support": { "issues": "https://github.com/sylvainjule/kirby-matomo/issues", - "source": "https://github.com/sylvainjule/kirby-matomo/tree/1.0.7" + "source": "https://github.com/sylvainjule/kirby-matomo/tree/2.0.1" }, - "time": "2021-11-20T01:20:25+00:00" + "time": "2024-05-04T17:36:22+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "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/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -833,7 +841,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.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -849,7 +857,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -932,16 +940,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -957,9 +965,6 @@ "thanks": { "url": "https://github.com/symfony/polyfill", "name": "symfony/polyfill" - }, - "branch-alias": { - "dev-main": "1.28-dev" } }, "autoload": { @@ -999,7 +1004,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -1015,7 +1020,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -1100,16 +1105,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -1126,9 +1131,6 @@ "thanks": { "url": "https://github.com/symfony/polyfill", "name": "symfony/polyfill" - }, - "branch-alias": { - "dev-main": "1.28-dev" } }, "autoload": { @@ -1163,7 +1165,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -1179,7 +1181,7 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/polyfill-php81", @@ -1259,31 +1261,28 @@ }, { "name": "symfony/yaml", - "version": "v5.4.30", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554" + "reference": "52903de178d542850f6f341ba92995d3d63e60c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c6980e82a6656f6ebfabfd82f7585794cb122554", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554", + "url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9", + "reference": "52903de178d542850f6f341ba92995d3d63e60c9", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.3" + "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -1314,7 +1313,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.30" + "source": "https://github.com/symfony/yaml/tree/v6.4.8" }, "funding": [ { @@ -1330,20 +1329,20 @@ "type": "tidelift" } ], - "time": "2023-10-27T18:36:14+00:00" + "time": "2024-05-31T14:49:08+00:00" }, { "name": "twig/twig", - "version": "v3.17.1", + "version": "v3.18.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71" + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/677ef8da6497a03048192aeeb5aa3018e379ac71", - "reference": "677ef8da6497a03048192aeeb5aa3018e379ac71", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", + "reference": "acffa88cc2b40dbe42eaf3a5025d6c0d4600cc50", "shasum": "" }, "require": { @@ -1398,7 +1397,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.17.1" + "source": "https://github.com/twigphp/Twig/tree/v3.18.0" }, "funding": [ { @@ -1410,7 +1409,7 @@ "type": "tidelift" } ], - "time": "2024-12-12T09:58:10+00:00" + "time": "2024-12-29T10:51:50+00:00" }, { "name": "wearejust/kirby-twig", @@ -1469,7 +1468,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.3.0 <8.1.0" + "php": ">=8.1.0 <8.4.0" }, "platform-dev": {}, "plugin-api-version": "2.6.0" diff --git a/kirby/bootstrap.php b/kirby/bootstrap.php index d61e5e5..9a419de 100644 --- a/kirby/bootstrap.php +++ b/kirby/bootstrap.php @@ -5,8 +5,8 @@ * stop at older or too recent versions */ if ( - version_compare(PHP_VERSION, '8.0.0', '>=') === false || - version_compare(PHP_VERSION, '8.3.0', '<') === false + version_compare(PHP_VERSION, '8.1.0', '>=') === false || + version_compare(PHP_VERSION, '8.4.0', '<') === false ) { die(include __DIR__ . '/views/php.php'); } diff --git a/kirby/composer.json b/kirby/composer.json index efc1dba..9eb7970 100644 --- a/kirby/composer.json +++ b/kirby/composer.json @@ -3,7 +3,7 @@ "description": "The Kirby 3 core", "license": "proprietary", "type": "kirby-cms", - "version": "3.9.8.2", + "version": "3.10.1.1", "keywords": [ "kirby", "cms", @@ -24,7 +24,7 @@ "source": "https://github.com/getkirby/kirby" }, "require": { - "php": ">=8.0.0 <8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-SimpleXML": "*", "ext-ctype": "*", "ext-curl": "*", @@ -36,16 +36,16 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-openssl": "*", - "claviska/simpleimage": "4.0.6", + "claviska/simpleimage": "4.2.0", "composer/semver": "3.4.0", "filp/whoops": "2.15.4", "getkirby/composer-installer": "^1.2.1", - "laminas/laminas-escaper": "2.12.0", + "laminas/laminas-escaper": "2.13.0", "michelf/php-smartypants": "1.8.1", - "phpmailer/phpmailer": "6.8.1", - "symfony/polyfill-intl-idn": "1.28.0", - "symfony/polyfill-mbstring": "1.28.0", - "symfony/yaml": "5.4.30" + "phpmailer/phpmailer": "6.9.1", + "symfony/polyfill-intl-idn": "1.30.0", + "symfony/polyfill-mbstring": "1.30.0", + "symfony/yaml": "6.4.8" }, "replace": { "symfony/polyfill-php72": "*" @@ -79,7 +79,7 @@ }, "optimize-autoloader": true, "platform": { - "php": "8.0.0" + "php": "8.1.0" }, "platform-check": false }, diff --git a/kirby/composer.lock b/kirby/composer.lock index 7643eed..69df2cd 100644 --- a/kirby/composer.lock +++ b/kirby/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "677f7cca91b0fc32ce6dd0c1b75fedfd", + "content-hash": "422424ea128b83257e5cc3506bcbe984", "packages": [ { "name": "claviska/simpleimage", - "version": "4.0.6", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa" + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/969de5e61810ef91f6f83c475b192c4841367dfa", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/dfbe53c01dae8467468ef2b817c09b786a7839d2", + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2", "shasum": "" }, "require": { @@ -49,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/4.0.6" + "source": "https://github.com/claviska/SimpleImage/tree/4.2.0" }, "funding": [ { @@ -57,7 +57,7 @@ "type": "github" } ], - "time": "2023-07-27T16:48:12+00:00" + "time": "2024-04-15T16:07:16+00:00" }, { "name": "composer/semver", @@ -260,33 +260,33 @@ }, { "name": "laminas/laminas-escaper", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.26.6", - "laminas/laminas-coding-standard": "~2.4.0", + "infection/infection": "^0.27.0", + "laminas/laminas-coding-standard": "~2.5.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.5.18", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.22.0" + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" }, "type": "library", "autoload": { @@ -318,7 +318,7 @@ "type": "community_bridge" } ], - "time": "2022-10-10T10:11:09+00:00" + "time": "2023-10-10T08:35:13+00:00" }, { "name": "league/color-extractor", @@ -437,16 +437,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -466,6 +466,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "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", @@ -505,7 +506,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.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -513,7 +514,7 @@ "type": "github" } ], - "time": "2023-08-29T08:26:30+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "psr/log", @@ -567,25 +568,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -614,7 +615,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -630,7 +631,7 @@ "type": "tidelift" } ], - "time": "2023-01-24T14:02:46+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/polyfill-ctype", @@ -713,16 +714,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -735,9 +736,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -780,7 +778,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -796,7 +794,7 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:30:37+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { "name": "symfony/polyfill-intl-normalizer", @@ -881,16 +879,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -904,9 +902,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -944,7 +939,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -960,35 +955,32 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.30", + "version": "v6.4.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554" + "reference": "52903de178d542850f6f341ba92995d3d63e60c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c6980e82a6656f6ebfabfd82f7585794cb122554", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554", + "url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9", + "reference": "52903de178d542850f6f341ba92995d3d63e60c9", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.3" + "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/console": "^5.4|^6.0|^7.0" }, "bin": [ "Resources/bin/yaml-lint" @@ -1019,7 +1011,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.30" + "source": "https://github.com/symfony/yaml/tree/v6.4.8" }, "funding": [ { @@ -1035,7 +1027,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T18:36:14+00:00" + "time": "2024-05-31T14:49:08+00:00" } ], "packages-dev": [], @@ -1045,7 +1037,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0.0 <8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-simplexml": "*", "ext-ctype": "*", "ext-curl": "*", @@ -1060,7 +1052,7 @@ }, "platform-dev": [], "platform-overrides": { - "php": "8.0.0" + "php": "8.1.0" }, "plugin-api-version": "2.6.0" } diff --git a/kirby/config/helpers.php b/kirby/config/helpers.php index 1b34248..a98b8a5 100644 --- a/kirby/config/helpers.php +++ b/kirby/config/helpers.php @@ -195,10 +195,8 @@ if (Helpers::hasOverride('go') === false) { // @codeCoverageIgnore /** * Redirects to the given Urls * Urls can be relative or absolute. - * - * @todo Change return type to `never` once support for PHP 8.0 is dropped */ - function go(string $url = '/', int $code = 302): void + function go(string $url = '/', int $code = 302): never { Response::go($url, $code); } diff --git a/kirby/src/Cms/System.php b/kirby/src/Cms/System.php index 481efa1..ad83ebf 100644 --- a/kirby/src/Cms/System.php +++ b/kirby/src/Cms/System.php @@ -417,8 +417,8 @@ class System public function php(): bool { return - version_compare(PHP_VERSION, '8.0.0', '>=') === true && - version_compare(PHP_VERSION, '8.3.0', '<') === true; + version_compare(PHP_VERSION, '8.1.0', '>=') === true && + version_compare(PHP_VERSION, '8.4.0', '<') === true; } /** diff --git a/kirby/src/Http/Response.php b/kirby/src/Http/Response.php index 9146832..0c373bf 100644 --- a/kirby/src/Http/Response.php +++ b/kirby/src/Http/Response.php @@ -198,9 +198,8 @@ class Response * @since 3.7.0 * * @codeCoverageIgnore - * @todo Change return type to `never` once support for PHP 8.0 is dropped */ - public static function go(string $url = '/', int $code = 302): void + public static function go(string $url = '/', int $code = 302): never { die(static::redirect($url, $code)); } diff --git a/kirby/src/Toolkit/A.php b/kirby/src/Toolkit/A.php index 7eef5a2..b2b370c 100644 --- a/kirby/src/Toolkit/A.php +++ b/kirby/src/Toolkit/A.php @@ -895,6 +895,8 @@ class A * // 'password' => 'super-secret' * // ]; * + * + * @psalm-suppress NamedArgumentNotAllowed */ public static function extend(array ...$arrays): array { diff --git a/kirby/vendor/bin/yaml-lint b/kirby/vendor/bin/yaml-lint index b5cdff9..388092f 100755 --- a/kirby/vendor/bin/yaml-lint +++ b/kirby/vendor/bin/yaml-lint @@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) { (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) ) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'); - exit(0); + return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'); } } -include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'; +return include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint'; diff --git a/kirby/vendor/bin/yaml-lint.bat b/kirby/vendor/bin/yaml-lint.bat new file mode 100644 index 0000000..fbce06e --- /dev/null +++ b/kirby/vendor/bin/yaml-lint.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/yaml-lint +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php b/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php index 98a8232..c9c0c7b 100644 --- a/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php +++ b/kirby/vendor/claviska/simpleimage/src/claviska/SimpleImage.php @@ -116,15 +116,33 @@ class SimpleImage */ public function __destruct() { - if ($this->image instanceof GdImage) { - imagedestroy($this->image); - } + $this->reset(); } ////////////////////////////////////////////////////////////////////////////////////////////////// // Helper functions ////////////////////////////////////////////////////////////////////////////////////////////////// + /** + * Checks if the SimpleImage object has loaded an image. + */ + public function hasImage(): bool + { + return $this->image instanceof GdImage; + } + + /** + * Destroys the image resource. + */ + public function reset(): static + { + if ($this->hasImage()) { + imagedestroy($this->image); + } + + return $this; + } + /** * Set flag value. * @@ -313,7 +331,7 @@ class SimpleImage * * @throws Exception Thrown when WEBP support is not enabled or unsupported format. */ - protected function generate(string $mimeType = null, array|int $options = []): array + public function generate(string $mimeType = null, array|int $options = 100): array { // Format defaults to the original mime type $mimeType = $mimeType ?: $this->mimeType; @@ -1616,12 +1634,12 @@ class SimpleImage * @param int $width The ellipse width. * @param int $height The ellipse height. * @param string|array $color The ellipse color. - * @param int|array $thickness Line thickness in pixels or 'filled' (default 1). + * @param string|int|array $thickness Line thickness in pixels or 'filled' (default 1). * @return SimpleImage * * @throws Exception */ - public function ellipse(int $x, int $y, int $width, int $height, string|array $color, int|array $thickness = 1): static + public function ellipse(int $x, int $y, int $width, int $height, string|array $color, string|int|array $thickness = 1): static { // Allocate the color $tempColor = $this->allocateColor($color); @@ -2337,18 +2355,24 @@ class SimpleImage $hex = strval(preg_replace('/^#/', '', $color)); // Support short and standard hex codes - if (strlen($hex) === 3) { + if (strlen($hex) === 3 || strlen($hex) === 4) { [$red, $green, $blue] = [ $hex[0].$hex[0], $hex[1].$hex[1], $hex[2].$hex[2], ]; - } elseif (strlen($hex) === 6) { + if (strlen($hex) === 4) { + $alpha = hexdec($hex[3]) / 255; + } + } elseif (strlen($hex) === 6 || strlen($hex) === 8) { [$red, $green, $blue] = [ $hex[0].$hex[1], $hex[2].$hex[3], $hex[4].$hex[5], ]; + if (strlen($hex) === 8) { + $alpha = hexdec($hex[6].$hex[7]) / 255; + } } else { throw new Exception("Invalid color value: $color", self::ERR_INVALID_COLOR); } diff --git a/kirby/vendor/composer/installed.json b/kirby/vendor/composer/installed.json index 51030ab..cb05ab6 100644 --- a/kirby/vendor/composer/installed.json +++ b/kirby/vendor/composer/installed.json @@ -2,17 +2,17 @@ "packages": [ { "name": "claviska/simpleimage", - "version": "4.0.6", - "version_normalized": "4.0.6.0", + "version": "4.2.0", + "version_normalized": "4.2.0.0", "source": { "type": "git", "url": "https://github.com/claviska/SimpleImage.git", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa" + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/969de5e61810ef91f6f83c475b192c4841367dfa", - "reference": "969de5e61810ef91f6f83c475b192c4841367dfa", + "url": "https://api.github.com/repos/claviska/SimpleImage/zipball/dfbe53c01dae8467468ef2b817c09b786a7839d2", + "reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2", "shasum": "" }, "require": { @@ -24,7 +24,7 @@ "laravel/pint": "^1.5", "phpstan/phpstan": "^1.10" }, - "time": "2023-07-27T16:48:12+00:00", + "time": "2024-04-15T16:07:16+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -46,7 +46,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/4.0.6" + "source": "https://github.com/claviska/SimpleImage/tree/4.2.0" }, "funding": [ { @@ -266,36 +266,36 @@ }, { "name": "laminas/laminas-escaper", - "version": "2.12.0", - "version_normalized": "2.12.0.0", + "version": "2.13.0", + "version_normalized": "2.13.0.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-escaper.git", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490" + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", - "reference": "ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490", + "url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba", + "reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba", "shasum": "" }, "require": { "ext-ctype": "*", "ext-mbstring": "*", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "conflict": { "zendframework/zend-escaper": "*" }, "require-dev": { - "infection/infection": "^0.26.6", - "laminas/laminas-coding-standard": "~2.4.0", + "infection/infection": "^0.27.0", + "laminas/laminas-coding-standard": "~2.5.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.5.18", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.22.0" + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" }, - "time": "2022-10-10T10:11:09+00:00", + "time": "2023-10-10T08:35:13+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -452,17 +452,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", - "version_normalized": "6.8.1.0", + "version": "v6.9.1", + "version_normalized": "6.9.1.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -482,6 +482,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "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", @@ -491,7 +492,7 @@ "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, - "time": "2023-08-29T08:26:30+00:00", + "time": "2023-11-25T22:23:28+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -523,7 +524,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.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -588,27 +589,27 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", - "version_normalized": "2.5.3.0", + "version": "v3.5.0", + "version_normalized": "3.5.0.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, - "time": "2023-01-24T14:02:46+00:00", + "time": "2024-04-18T09:32:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -638,7 +639,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -740,17 +741,17 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.30.0", + "version_normalized": "1.30.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", - "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", "shasum": "" }, "require": { @@ -761,12 +762,9 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2023-01-26T09:30:37+00:00", + "time": "2024-05-31T15:07:36+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -810,7 +808,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" }, "funding": [ { @@ -914,17 +912,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", - "version_normalized": "1.28.0.0", + "version": "v1.30.0", + "version_normalized": "1.30.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -936,12 +934,9 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2023-07-28T09:04:16+00:00", + "time": "2024-06-19T12:30:46+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -980,7 +975,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -1000,34 +995,31 @@ }, { "name": "symfony/yaml", - "version": "v5.4.30", - "version_normalized": "5.4.30.0", + "version": "v6.4.8", + "version_normalized": "6.4.8.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554" + "reference": "52903de178d542850f6f341ba92995d3d63e60c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c6980e82a6656f6ebfabfd82f7585794cb122554", - "reference": "c6980e82a6656f6ebfabfd82f7585794cb122554", + "url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9", + "reference": "52903de178d542850f6f341ba92995d3d63e60c9", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<5.3" + "symfony/console": "<5.4" }, "require-dev": { - "symfony/console": "^5.3|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "time": "2023-10-27T18:36:14+00:00", + "time": "2024-05-31T14:49:08+00:00", "bin": [ "Resources/bin/yaml-lint" ], @@ -1058,7 +1050,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.30" + "source": "https://github.com/symfony/yaml/tree/v6.4.8" }, "funding": [ { diff --git a/kirby/vendor/composer/installed.php b/kirby/vendor/composer/installed.php index 3d727d1..f68cf19 100644 --- a/kirby/vendor/composer/installed.php +++ b/kirby/vendor/composer/installed.php @@ -1,8 +1,8 @@ array( 'name' => 'getkirby/cms', - 'pretty_version' => '3.9.8.2', - 'version' => '3.9.8.2', + 'pretty_version' => '3.10.1.1', + 'version' => '3.10.1.1', 'reference' => null, 'type' => 'kirby-cms', 'install_path' => __DIR__ . '/../../', @@ -11,9 +11,9 @@ ), 'versions' => array( 'claviska/simpleimage' => array( - 'pretty_version' => '4.0.6', - 'version' => '4.0.6.0', - 'reference' => '969de5e61810ef91f6f83c475b192c4841367dfa', + 'pretty_version' => '4.2.0', + 'version' => '4.2.0.0', + 'reference' => 'dfbe53c01dae8467468ef2b817c09b786a7839d2', 'type' => 'library', 'install_path' => __DIR__ . '/../claviska/simpleimage', 'aliases' => array(), @@ -38,8 +38,8 @@ 'dev_requirement' => false, ), 'getkirby/cms' => array( - 'pretty_version' => '3.9.8.2', - 'version' => '3.9.8.2', + 'pretty_version' => '3.10.1.1', + 'version' => '3.10.1.1', 'reference' => null, 'type' => 'kirby-cms', 'install_path' => __DIR__ . '/../../', @@ -56,9 +56,9 @@ 'dev_requirement' => false, ), 'laminas/laminas-escaper' => array( - 'pretty_version' => '2.12.0', - 'version' => '2.12.0.0', - 'reference' => 'ee7a4c37bf3d0e8c03635d5bddb5bb3184ead490', + 'pretty_version' => '2.13.0', + 'version' => '2.13.0.0', + 'reference' => 'af459883f4018d0f8a0c69c7a209daef3bf973ba', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-escaper', 'aliases' => array(), @@ -89,9 +89,9 @@ 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.8.1', - 'version' => '6.8.1.0', - 'reference' => 'e88da8d679acc3824ff231fdc553565b802ac016', + 'pretty_version' => 'v6.9.1', + 'version' => '6.9.1.0', + 'reference' => '039de174cd9c17a8389754d3b877a2ed22743e18', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), @@ -107,9 +107,9 @@ 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( - 'pretty_version' => 'v2.5.3', - 'version' => '2.5.3.0', - 'reference' => '80d075412b557d41002320b96a096ca65aa2c98d', + 'pretty_version' => 'v3.5.0', + 'version' => '3.5.0.0', + 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), @@ -125,9 +125,9 @@ 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d', + 'pretty_version' => 'v1.30.0', + 'version' => '1.30.0.0', + 'reference' => 'a6e83bdeb3c84391d1dfe16f42e40727ce524a5c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), @@ -143,9 +143,9 @@ 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.28.0', - 'version' => '1.28.0.0', - 'reference' => '42292d99c55abe617799667f454222c54c60e229', + 'pretty_version' => 'v1.30.0', + 'version' => '1.30.0.0', + 'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), @@ -158,9 +158,9 @@ ), ), 'symfony/yaml' => array( - 'pretty_version' => 'v5.4.30', - 'version' => '5.4.30.0', - 'reference' => 'c6980e82a6656f6ebfabfd82f7585794cb122554', + 'pretty_version' => 'v6.4.8', + 'version' => '6.4.8.0', + 'reference' => '52903de178d542850f6f341ba92995d3d63e60c9', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), diff --git a/kirby/vendor/laminas/laminas-escaper/composer.json b/kirby/vendor/laminas/laminas-escaper/composer.json index 75c503f..16cf063 100644 --- a/kirby/vendor/laminas/laminas-escaper/composer.json +++ b/kirby/vendor/laminas/laminas-escaper/composer.json @@ -18,7 +18,7 @@ "config": { "sort-packages": true, "platform": { - "php": "7.4.99" + "php": "8.1.99" }, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, @@ -29,17 +29,17 @@ "extra": { }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-ctype": "*", "ext-mbstring": "*" }, "require-dev": { - "infection/infection": "^0.26.6", - "laminas/laminas-coding-standard": "~2.4.0", + "infection/infection": "^0.27.0", + "laminas/laminas-coding-standard": "~2.5.0", "maglnet/composer-require-checker": "^3.8.0", - "phpunit/phpunit": "^9.5.18", - "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.22.0" + "phpunit/phpunit": "^9.6.7", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.9" }, "autoload": { "psr-4": { diff --git a/kirby/vendor/laminas/laminas-escaper/src/Escaper.php b/kirby/vendor/laminas/laminas-escaper/src/Escaper.php index d6a02e1..c4964cb 100644 --- a/kirby/vendor/laminas/laminas-escaper/src/Escaper.php +++ b/kirby/vendor/laminas/laminas-escaper/src/Escaper.php @@ -157,9 +157,21 @@ class Escaper $this->htmlSpecialCharsFlags = ENT_QUOTES | ENT_SUBSTITUTE; // set matcher callbacks - $this->htmlAttrMatcher = [$this, 'htmlAttrMatcher']; - $this->jsMatcher = [$this, 'jsMatcher']; - $this->cssMatcher = [$this, 'cssMatcher']; + $this->htmlAttrMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->htmlAttrMatcher($matches); + }; + $this->jsMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->jsMatcher($matches); + }; + $this->cssMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->cssMatcher($matches); + }; } /** diff --git a/kirby/vendor/phpmailer/phpmailer/composer.json b/kirby/vendor/phpmailer/phpmailer/composer.json index 2fd2f4c..fa170a0 100644 --- a/kirby/vendor/phpmailer/phpmailer/composer.json +++ b/kirby/vendor/phpmailer/phpmailer/composer.json @@ -47,6 +47,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "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", diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php new file mode 100644 index 0000000..327dfba --- /dev/null +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php @@ -0,0 +1,35 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি'; +$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।'; +$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই'; +$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।'; +$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: '; +$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: '; +$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: '; +$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: '; +$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: '; +$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: '; +$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম'; +$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: '; +$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান'; +$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: '; +$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:'; +$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।'; +$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: '; +$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: '; +$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: '; +$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: '; +$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: '; diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php new file mode 100644 index 0000000..4736510 --- /dev/null +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php @@ -0,0 +1,35 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷'; +$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।'; +$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷'; +$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।'; +$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: '; +$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: '; +$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:'; +$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: '; +$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: '; +$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷'; +$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: '; +$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান'; +$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: '; +$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:'; +$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।'; +$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:'; +$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: '; +$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: '; +$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: '; diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php index 8b7b38a..db9a1ef 100644 --- a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php @@ -9,6 +9,7 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; +$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; $PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; diff --git a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php index b0469fd..cb7b2c2 100644 --- a/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +++ b/kirby/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -6,21 +6,28 @@ */ $PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.'; +$PHPMAILER_LANG['buggy_php'] = 'Twoja wersja PHP zawiera błąd, który może powodować uszkodzenie wiadomości. Aby go naprawić, przełącz się na wysyłanie za pomocą SMTP, wyłącz opcję mail.add_x_header w php.ini, przełącz się na MacOS lub Linux lub zaktualizuj PHP do wersji 7.0.17+ lub 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.'; $PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.'; $PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.'; $PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: '; $PHPMAILER_LANG['execute'] = 'Nie można uruchomić: '; +$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: '; $PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: '; $PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: '; $PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: '; $PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.'; $PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: '; +$PHPMAILER_LANG['invalid_header'] = 'Nieprawidłowa nazwa lub wartość nagłówka'; +$PHPMAILER_LANG['invalid_hostentry'] = 'Nieprawidłowy wpis hosta: '; +$PHPMAILER_LANG['invalid_host'] = 'Nieprawidłowy host: '; $PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.'; $PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.'; $PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: '; $PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: '; +$PHPMAILER_LANG['smtp_code'] = 'Kod SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatkowe informacje SMTP: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.'; +$PHPMAILER_LANG['smtp_detail'] = 'Szczegóły: '; $PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: '; -$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: '; diff --git a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php index 7f56ea2..ba4bcd4 100644 --- a/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/kirby/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -357,6 +357,13 @@ class PHPMailer */ public $AuthType = ''; + /** + * SMTP SMTPXClient command attibutes + * + * @var array + */ + protected $SMTPXClient = []; + /** * An implementation of the PHPMailer OAuthTokenProvider interface. * @@ -750,7 +757,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * Error severity: message only, continue processing. @@ -1571,6 +1578,10 @@ class PHPMailer //Validate From, Sender, and ConfirmReadingTo addresses foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + if ($this->{$address_kind} === null) { + $this->{$address_kind} = ''; + continue; + } $this->{$address_kind} = trim($this->{$address_kind}); if (empty($this->{$address_kind})) { continue; @@ -1997,6 +2008,38 @@ class PHPMailer return $this->smtp; } + /** + * Provide SMTP XCLIENT attributes + * + * @param string $name Attribute name + * @param ?string $value Attribute value + * + * @return bool + */ + public function setSMTPXclientAttribute($name, $value) + { + if (!in_array($name, SMTP::$xclient_allowed_attributes)) { + return false; + } + if (isset($this->SMTPXClient[$name]) && $value === null) { + unset($this->SMTPXClient[$name]); + } elseif ($value !== null) { + $this->SMTPXClient[$name] = $value; + } + + return true; + } + + /** + * Get SMTP XCLIENT attributes + * + * @return array + */ + public function getSMTPXclientAttributes() + { + return $this->SMTPXClient; + } + /** * Send mail via SMTP. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. @@ -2025,6 +2068,9 @@ class PHPMailer } else { $smtp_from = $this->Sender; } + if (count($this->SMTPXClient)) { + $this->smtp->xclient($this->SMTPXClient); + } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); @@ -2187,10 +2233,17 @@ class PHPMailer $this->smtp->hello($hello); //Automatically enable TLS encryption if: //* it's not disabled + //* we are not connecting to localhost //* we have openssl extension //* we are not already using SSL //* the server offers STARTTLS - if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) { + if ( + $this->SMTPAutoTLS && + $this->Host !== 'localhost' && + $sslext && + $secure !== 'ssl' && + $this->smtp->getServerExt('STARTTLS') + ) { $tls = true; } if ($tls) { @@ -4047,6 +4100,79 @@ class PHPMailer $this->CustomHeader = []; } + /** + * Clear a specific custom header by name or name and value. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + */ + public function clearCustomHeader($name, $value = null) + { + if (null === $value && strpos($name, ':') !== false) { + //Value passed in as name:value + list($name, $value) = explode(':', $name, 2); + } + $name = trim($name); + $value = (null === $value) ? null : trim($value); + + foreach ($this->CustomHeader as $k => $pair) { + if ($pair[0] == $name) { + // We remove the header if the value is not provided or it matches. + if (null === $value || $pair[1] == $value) { + unset($this->CustomHeader[$k]); + } + } + } + + return true; + } + + /** + * Replace a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + * @throws Exception + */ + public function replaceCustomHeader($name, $value = null) + { + if (null === $value && strpos($name, ':') !== false) { + //Value passed in as name:value + list($name, $value) = explode(':', $name, 2); + } + $name = trim($name); + $value = (null === $value) ? '' : trim($value); + + $replaced = false; + foreach ($this->CustomHeader as $k => $pair) { + if ($pair[0] == $name) { + if ($replaced) { + unset($this->CustomHeader[$k]); + continue; + } + if (strpbrk($name . $value, "\r\n") !== false) { + if ($this->exceptions) { + throw new Exception($this->lang('invalid_header')); + } + + return false; + } + $this->CustomHeader[$k] = [$name, $value]; + $replaced = true; + } + } + + return true; + } + /** * Add an error message to the error container. * diff --git a/kirby/vendor/phpmailer/phpmailer/src/POP3.php b/kirby/vendor/phpmailer/phpmailer/src/POP3.php index b92a1f2..7b25fdd 100644 --- a/kirby/vendor/phpmailer/phpmailer/src/POP3.php +++ b/kirby/vendor/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * Default POP3 port number. diff --git a/kirby/vendor/phpmailer/phpmailer/src/SMTP.php b/kirby/vendor/phpmailer/phpmailer/src/SMTP.php index 2b63840..1b5b007 100644 --- a/kirby/vendor/phpmailer/phpmailer/src/SMTP.php +++ b/kirby/vendor/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * SMTP line break constant. @@ -198,6 +198,18 @@ class SMTP 'Mailjet' => '/[\d]{3} OK queued as (.*)/', ]; + /** + * Allowed SMTP XCLIENT attributes. + * Must be allowed by the SMTP server. EHLO response is not checked. + * + * @see https://www.postfix.org/XCLIENT_README.html + * + * @var array + */ + public static $xclient_allowed_attributes = [ + 'NAME', 'ADDR', 'PORT', 'PROTO', 'HELO', 'LOGIN', 'DESTADDR', 'DESTPORT' + ]; + /** * The last transaction ID issued in response to a DATA command, * if one was detected. @@ -971,6 +983,25 @@ class SMTP ); } + /** + * Send SMTP XCLIENT command to server and check its return code. + * + * @return bool True on success + */ + public function xclient(array $vars) + { + $xclient_options = ""; + foreach ($vars as $key => $value) { + if (in_array($key, SMTP::$xclient_allowed_attributes)) { + $xclient_options .= " {$key}={$value}"; + } + } + if (!$xclient_options) { + return true; + } + return $this->sendCommand('XCLIENT', 'XCLIENT' . $xclient_options, 250); + } + /** * Send an SMTP RSET command. * Abort any transaction that is currently in progress. diff --git a/kirby/vendor/symfony/deprecation-contracts/composer.json b/kirby/vendor/symfony/deprecation-contracts/composer.json index cc7cc12..ceb6c07 100644 --- a/kirby/vendor/symfony/deprecation-contracts/composer.json +++ b/kirby/vendor/symfony/deprecation-contracts/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": ">=7.1" + "php": ">=8.1" }, "autoload": { "files": [ @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", diff --git a/kirby/vendor/symfony/deprecation-contracts/function.php b/kirby/vendor/symfony/deprecation-contracts/function.php index d437150..2d56512 100644 --- a/kirby/vendor/symfony/deprecation-contracts/function.php +++ b/kirby/vendor/symfony/deprecation-contracts/function.php @@ -20,7 +20,7 @@ if (!function_exists('trigger_deprecation')) { * * @author Nicolas Grekas */ - function trigger_deprecation(string $package, string $version, string $message, ...$args): void + function trigger_deprecation(string $package, string $version, string $message, mixed ...$args): void { @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); } diff --git a/kirby/vendor/symfony/polyfill-intl-idn/Idn.php b/kirby/vendor/symfony/polyfill-intl-idn/Idn.php index 3dc0612..eb6bada 100644 --- a/kirby/vendor/symfony/polyfill-intl-idn/Idn.php +++ b/kirby/vendor/symfony/polyfill-intl-idn/Idn.php @@ -280,10 +280,6 @@ final class Idn switch ($data['status']) { case 'disallowed': - $info->errors |= self::ERROR_DISALLOWED; - - // no break. - case 'valid': $str .= mb_chr($codePoint, 'utf-8'); @@ -294,7 +290,7 @@ final class Idn break; case 'mapped': - $str .= $data['mapping']; + $str .= $transitional && 0x1E9E === $codePoint ? 'ss' : $data['mapping']; break; @@ -346,6 +342,18 @@ final class Idn $validationOptions = $options; if ('xn--' === substr($label, 0, 4)) { + // Step 4.1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F), + // record that there was an error, and continue with the next label. + if (preg_match('/[^\x00-\x7F]/', $label)) { + $info->errors |= self::ERROR_PUNYCODE; + + continue; + } + + // Step 4.2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If + // that conversion fails, record that there was an error, and continue + // with the next label. Otherwise replace the original label in the string by the results of the + // conversion. try { $label = self::punycodeDecode(substr($label, 4)); } catch (\Exception $e) { @@ -516,6 +524,8 @@ final class Idn if ('-' === substr($label, -1, 1)) { $info->errors |= self::ERROR_TRAILING_HYPHEN; } + } elseif ('xn--' === substr($label, 0, 4)) { + $info->errors |= self::ERROR_PUNYCODE; } // Step 4. The label must not contain a U+002E (.) FULL STOP. diff --git a/kirby/vendor/symfony/polyfill-intl-idn/composer.json b/kirby/vendor/symfony/polyfill-intl-idn/composer.json index 78e478e..12f75bc 100644 --- a/kirby/vendor/symfony/polyfill-intl-idn/composer.json +++ b/kirby/vendor/symfony/polyfill-intl-idn/composer.json @@ -33,9 +33,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php b/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php index 2e0b969..1ad33a8 100644 --- a/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/kirby/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -48,6 +48,8 @@ namespace Symfony\Polyfill\Mbstring; * - mb_strstr - Finds first occurrence of a string within another * - mb_strwidth - Return width of string * - mb_substr_count - Count the number of substring occurrences + * - mb_ucfirst - Make a string's first character uppercase + * - mb_lcfirst - Make a string's first character lowercase * * Not implemented: * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) @@ -80,6 +82,21 @@ final class Mbstring public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { + if (\is_array($s)) { + if (PHP_VERSION_ID < 70200) { + trigger_error('mb_convert_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); + + return null; + } + + $r = []; + foreach ($s as $str) { + $r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding); + } + + return $r; + } + if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) { $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); } else { @@ -410,7 +427,7 @@ final class Mbstring public static function mb_check_encoding($var = null, $encoding = null) { - if (PHP_VERSION_ID < 70200 && \is_array($var)) { + if (\PHP_VERSION_ID < 70200 && \is_array($var)) { trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); return null; @@ -437,7 +454,6 @@ final class Mbstring } return true; - } public static function mb_detect_encoding($str, $encodingList = null, $strict = false) @@ -827,7 +843,7 @@ final class Mbstring return $code; } - public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null): string { if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); @@ -835,17 +851,8 @@ final class Mbstring if (null === $encoding) { $encoding = self::mb_internal_encoding(); - } - - try { - $validEncoding = @self::mb_check_encoding('', $encoding); - } catch (\ValueError $e) { - throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - // BC for PHP 7.3 and lower - if (!$validEncoding) { - throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } else { + self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given'); } if (self::mb_strlen($pad_string, $encoding) <= 0) { @@ -871,6 +878,34 @@ final class Mbstring } } + public static function mb_ucfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + + public static function mb_lcfirst(string $string, ?string $encoding = null): string + { + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } else { + self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); + } + + $firstChar = mb_substr($string, 0, 1, $encoding); + $firstChar = mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding); + + return $firstChar.mb_substr($string, 1, null, $encoding); + } + private static function getSubpart($pos, $part, $haystack, $encoding) { if (false === $pos) { @@ -944,4 +979,18 @@ final class Mbstring return $encoding; } + + private static function assertEncoding(string $encoding, string $errorFormat): void + { + try { + $validEncoding = @self::mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(\sprintf($errorFormat, $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(\sprintf($errorFormat, $encoding)); + } + } } diff --git a/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php b/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php index ecf1a03..6e4b5fc 100644 --- a/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/kirby/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -136,6 +136,14 @@ if (!function_exists('mb_str_pad')) { function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } } +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php b/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php index 2f9fb5b..ec2ae42 100644 --- a/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ b/kirby/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -132,6 +132,14 @@ if (!function_exists('mb_str_pad')) { function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } } +if (!function_exists('mb_ucfirst')) { + function mb_ucfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } +} + +if (!function_exists('mb_lcfirst')) { + function mb_lcfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/kirby/vendor/symfony/polyfill-mbstring/composer.json b/kirby/vendor/symfony/polyfill-mbstring/composer.json index 943e502..bd99d4b 100644 --- a/kirby/vendor/symfony/polyfill-mbstring/composer.json +++ b/kirby/vendor/symfony/polyfill-mbstring/composer.json @@ -30,9 +30,6 @@ }, "minimum-stability": "dev", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" diff --git a/kirby/vendor/symfony/yaml/Command/LintCommand.php b/kirby/vendor/symfony/yaml/Command/LintCommand.php index 3ebd570..e32339e 100644 --- a/kirby/vendor/symfony/yaml/Command/LintCommand.php +++ b/kirby/vendor/symfony/yaml/Command/LintCommand.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Yaml\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\CI\GithubActionReporter; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Completion\CompletionInput; @@ -32,34 +33,31 @@ use Symfony\Component\Yaml\Yaml; * @author Grégoire Pineau * @author Robin Chalas */ +#[AsCommand(name: 'lint:yaml', description: 'Lint a YAML file and outputs encountered errors')] class LintCommand extends Command { - protected static $defaultName = 'lint:yaml'; - protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors'; + private Parser $parser; + private ?string $format = null; + private bool $displayCorrectFiles; + private ?\Closure $directoryIteratorProvider; + private ?\Closure $isReadableProvider; - private $parser; - private $format; - private $displayCorrectFiles; - private $directoryIteratorProvider; - private $isReadableProvider; - - public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null) + public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null) { parent::__construct($name); - $this->directoryIteratorProvider = $directoryIteratorProvider; - $this->isReadableProvider = $isReadableProvider; + $this->directoryIteratorProvider = null === $directoryIteratorProvider ? null : $directoryIteratorProvider(...); + $this->isReadableProvider = null === $isReadableProvider ? null : $isReadableProvider(...); } /** - * {@inheritdoc} + * @return void */ protected function configure() { $this - ->setDescription(self::$defaultDescription) ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') + ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions()))) ->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude') ->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null) ->setHelp(<<getArgument('filename'); @@ -96,10 +94,6 @@ EOF $this->format = $input->getOption('format'); $flags = $input->getOption('parse-tags'); - if ('github' === $this->format && !class_exists(GithubActionReporter::class)) { - throw new \InvalidArgumentException('The "github" format is only available since "symfony/console" >= 5.3.'); - } - if (null === $this->format) { // Autodetect format according to CI environment $this->format = class_exists(GithubActionReporter::class) && GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'; @@ -133,7 +127,7 @@ EOF return $this->display($io, $filesInfo); } - private function validate(string $content, int $flags, string $file = null) + private function validate(string $content, int $flags, ?string $file = null): array { $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { if (\E_USER_DEPRECATED === $level) { @@ -156,16 +150,12 @@ EOF private function display(SymfonyStyle $io, array $files): int { - switch ($this->format) { - case 'txt': - return $this->displayTxt($io, $files); - case 'json': - return $this->displayJson($io, $files); - case 'github': - return $this->displayTxt($io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); - } + return match ($this->format) { + 'txt' => $this->displayTxt($io, $files), + 'json' => $this->displayJson($io, $files), + 'github' => $this->displayTxt($io, $files, true), + default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))), + }; } private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false): int @@ -186,7 +176,7 @@ EOF $io->text(' ERROR '.($info['file'] ? sprintf(' in %s', $info['file']) : '')); $io->text(sprintf(' >> %s', $info['message'])); - if (false !== strpos($info['message'], 'PARSE_CUSTOM_TAGS')) { + if (str_contains($info['message'], 'PARSE_CUSTOM_TAGS')) { $suggestTagOption = true; } @@ -215,7 +205,7 @@ EOF ++$errors; } - if (isset($v['message']) && false !== strpos($v['message'], 'PARSE_CUSTOM_TAGS')) { + if (isset($v['message']) && str_contains($v['message'], 'PARSE_CUSTOM_TAGS')) { $v['message'] .= ' Use the --parse-tags option if you want parse custom tags.'; } }); @@ -244,21 +234,15 @@ EOF private function getParser(): Parser { - if (!$this->parser) { - $this->parser = new Parser(); - } - - return $this->parser; + return $this->parser ??= new Parser(); } private function getDirectoryIterator(string $directory): iterable { - $default = function ($directory) { - return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - }; + $default = fn ($directory) => new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), + \RecursiveIteratorIterator::LEAVES_ONLY + ); if (null !== $this->directoryIteratorProvider) { return ($this->directoryIteratorProvider)($directory, $default); @@ -269,9 +253,7 @@ EOF private function isReadable(string $fileOrDirectory): bool { - $default = function ($fileOrDirectory) { - return is_readable($fileOrDirectory); - }; + $default = is_readable(...); if (null !== $this->isReadableProvider) { return ($this->isReadableProvider)($fileOrDirectory, $default); @@ -283,7 +265,12 @@ EOF public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void { if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); + $suggestions->suggestValues($this->getAvailableFormatOptions()); } } + + private function getAvailableFormatOptions(): array + { + return ['txt', 'json', 'github']; + } } diff --git a/kirby/vendor/symfony/yaml/Dumper.php b/kirby/vendor/symfony/yaml/Dumper.php index 99346aa..04646c5 100644 --- a/kirby/vendor/symfony/yaml/Dumper.php +++ b/kirby/vendor/symfony/yaml/Dumper.php @@ -24,10 +24,8 @@ class Dumper { /** * The amount of spaces to use for indentation of nested nodes. - * - * @var int */ - protected $indentation; + private int $indentation; public function __construct(int $indentation = 4) { @@ -46,7 +44,7 @@ class Dumper * @param int $indent The level of indentation (used internally) * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string */ - public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string + public function dump(mixed $input, int $inline = 0, int $indent = 0, int $flags = 0): string { $output = ''; $prefix = $indent ? str_repeat(' ', $indent) : ''; @@ -68,7 +66,11 @@ class Dumper $output .= "\n"; } - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r")) { + if (\is_int($key) && Yaml::DUMP_NUMERIC_KEY_AS_STRING & $flags) { + $key = (string) $key; + } + + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value) && str_contains($value, "\n") && !str_contains($value, "\r")) { $blockIndentationIndicator = $this->getBlockIndentationIndicator($value); if (isset($value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) { @@ -95,7 +97,7 @@ class Dumper if ($value instanceof TaggedValue) { $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag()); - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) { $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); $output .= sprintf(' |%s', $blockIndentationIndicator); @@ -140,7 +142,7 @@ class Dumper { $output = sprintf('%s!%s', $prefix ? $prefix.' ' : '', $value->getTag()); - if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) { + if (Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && \is_string($value->getValue()) && str_contains($value->getValue(), "\n") && !str_contains($value->getValue(), "\r\n")) { $blockIndentationIndicator = $this->getBlockIndentationIndicator($value->getValue()); $output .= sprintf(' |%s', $blockIndentationIndicator); diff --git a/kirby/vendor/symfony/yaml/Exception/ParseException.php b/kirby/vendor/symfony/yaml/Exception/ParseException.php index 8748d2b..60e8e19 100644 --- a/kirby/vendor/symfony/yaml/Exception/ParseException.php +++ b/kirby/vendor/symfony/yaml/Exception/ParseException.php @@ -18,10 +18,10 @@ namespace Symfony\Component\Yaml\Exception; */ class ParseException extends RuntimeException { - private $parsedFile; - private $parsedLine; - private $snippet; - private $rawMessage; + private ?string $parsedFile; + private int $parsedLine; + private ?string $snippet; + private string $rawMessage; /** * @param string $message The error message @@ -29,7 +29,7 @@ class ParseException extends RuntimeException * @param string|null $snippet The snippet of code near the problem * @param string|null $parsedFile The file name where the error occurred */ - public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null) + public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null) { $this->parsedFile = $parsedFile; $this->parsedLine = $parsedLine; @@ -43,16 +43,16 @@ class ParseException extends RuntimeException /** * Gets the snippet of code near the error. - * - * @return string */ - public function getSnippet() + public function getSnippet(): string { return $this->snippet; } /** * Sets the snippet of code near the error. + * + * @return void */ public function setSnippet(string $snippet) { @@ -65,16 +65,16 @@ class ParseException extends RuntimeException * Gets the filename where the error occurred. * * This method returns null if a string is parsed. - * - * @return string */ - public function getParsedFile() + public function getParsedFile(): string { return $this->parsedFile; } /** * Sets the filename where the error occurred. + * + * @return void */ public function setParsedFile(string $parsedFile) { @@ -85,16 +85,16 @@ class ParseException extends RuntimeException /** * Gets the line where the error occurred. - * - * @return int */ - public function getParsedLine() + public function getParsedLine(): int { return $this->parsedLine; } /** * Sets the line where the error occurred. + * + * @return void */ public function setParsedLine(int $parsedLine) { @@ -103,12 +103,12 @@ class ParseException extends RuntimeException $this->updateRepr(); } - private function updateRepr() + private function updateRepr(): void { $this->message = $this->rawMessage; $dot = false; - if ('.' === substr($this->message, -1)) { + if (str_ends_with($this->message, '.')) { $this->message = substr($this->message, 0, -1); $dot = true; } diff --git a/kirby/vendor/symfony/yaml/Inline.php b/kirby/vendor/symfony/yaml/Inline.php index 5b5f961..1ba90dc 100644 --- a/kirby/vendor/symfony/yaml/Inline.php +++ b/kirby/vendor/symfony/yaml/Inline.php @@ -26,15 +26,15 @@ class Inline { public const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - public static $parsedLineNumber = -1; - public static $parsedFilename; + public static int $parsedLineNumber = -1; + public static ?string $parsedFilename = null; - private static $exceptionOnInvalidType = false; - private static $objectSupport = false; - private static $objectForMap = false; - private static $constantSupport = false; + private static bool $exceptionOnInvalidType = false; + private static bool $objectSupport = false; + private static bool $objectForMap = false; + private static bool $constantSupport = false; - public static function initialize(int $flags, int $parsedLineNumber = null, string $parsedFilename = null) + public static function initialize(int $flags, ?int $parsedLineNumber = null, ?string $parsedFilename = null): void { self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); @@ -50,20 +50,13 @@ class Inline /** * Converts a YAML string to a PHP value. * - * @param string|null $value A YAML string - * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior - * @param array $references Mapping of variable names to values - * - * @return mixed + * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior + * @param array $references Mapping of variable names to values * * @throws ParseException */ - public static function parse(string $value = null, int $flags = 0, array &$references = []) + public static function parse(string $value, int $flags = 0, array &$references = []): mixed { - if (null === $value) { - return ''; - } - self::initialize($flags); $value = trim($value); @@ -72,42 +65,31 @@ class Inline return ''; } - if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('ASCII'); + $i = 0; + $tag = self::parseTag($value, $i, $flags); + switch ($value[$i]) { + case '[': + $result = self::parseSequence($value, $flags, $i, $references); + ++$i; + break; + case '{': + $result = self::parseMapping($value, $flags, $i, $references); + ++$i; + break; + default: + $result = self::parseScalar($value, $flags, null, $i, true, $references); } - try { - $i = 0; - $tag = self::parseTag($value, $i, $flags); - switch ($value[$i]) { - case '[': - $result = self::parseSequence($value, $flags, $i, $references); - ++$i; - break; - case '{': - $result = self::parseMapping($value, $flags, $i, $references); - ++$i; - break; - default: - $result = self::parseScalar($value, $flags, null, $i, true, $references); - } - - // some comments are allowed at the end - if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); - } - - if (null !== $tag && '' !== $tag) { - return new TaggedValue($tag, $result); - } - - return $result; - } finally { - if (isset($mbEncoding)) { - mb_internal_encoding($mbEncoding); - } + // some comments are allowed at the end + if (preg_replace('/\s*#.*$/A', '', substr($value, $i))) { + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } + + if (null !== $tag && '' !== $tag) { + return new TaggedValue($tag, $result); + } + + return $result; } /** @@ -118,7 +100,7 @@ class Inline * * @throws DumpException When trying to dump PHP resource */ - public static function dump($value, int $flags = 0): string + public static function dump(mixed $value, int $flags = 0): string { switch (true) { case \is_resource($value): @@ -128,9 +110,13 @@ class Inline return self::dumpNull($flags); case $value instanceof \DateTimeInterface: - return $value->format('c'); + return $value->format(match (true) { + !$length = \strlen(rtrim($value->format('u'), '0')) => 'c', + $length < 4 => 'Y-m-d\TH:i:s.vP', + default => 'Y-m-d\TH:i:s.uP', + }); case $value instanceof \UnitEnum: - return sprintf('!php/const %s::%s', \get_class($value), $value->name); + return sprintf('!php/const %s::%s', $value::class, $value->name); case \is_object($value): if ($value instanceof TaggedValue) { return '!'.$value->getTag().' '.self::dump($value->getValue(), $flags); @@ -141,13 +127,7 @@ class Inline } if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { - $output = []; - - foreach ($value as $key => $val) { - $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); - } - - return sprintf('{ %s }', implode(', ', $output)); + return self::dumpHashArray($value, $flags); } if (Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE & $flags) { @@ -176,8 +156,8 @@ class Inline $repr = str_ireplace('INF', '.Inf', $repr); } elseif (floor($value) == $value && $repr == $value) { // Preserve float data type since storing a whole number will result in integer value. - if (false === strpos($repr, 'E')) { - $repr = $repr.'.0'; + if (!str_contains($repr, 'E')) { + $repr .= '.0'; } } } else { @@ -195,6 +175,14 @@ class Inline case Escaper::requiresDoubleQuoting($value): return Escaper::escapeWithDoubleQuotes($value); case Escaper::requiresSingleQuoting($value): + $singleQuoted = Escaper::escapeWithSingleQuotes($value); + if (!str_contains($value, "'")) { + return $singleQuoted; + } + // Attempt double-quoting the string instead to see if it's more efficient. + $doubleQuoted = Escaper::escapeWithDoubleQuotes($value); + + return \strlen($doubleQuoted) < \strlen($singleQuoted) ? $doubleQuoted : $singleQuoted; case Parser::preg_match('{^[0-9]+[_0-9]*$}', $value): case Parser::preg_match(self::getHexRegex(), $value): case Parser::preg_match(self::getTimestampRegex(), $value): @@ -206,10 +194,8 @@ class Inline /** * Check if given array is hash or just normal indexed array. - * - * @param array|\ArrayObject|\stdClass $value The PHP array or array-like object to check */ - public static function isHash($value): bool + public static function isHash(array|\ArrayObject|\stdClass $value): bool { if ($value instanceof \stdClass || $value instanceof \ArrayObject) { return true; @@ -244,9 +230,23 @@ class Inline return sprintf('[%s]', implode(', ', $output)); } - // hash + return self::dumpHashArray($value, $flags); + } + + /** + * Dumps hash array to a YAML string. + * + * @param array|\ArrayObject|\stdClass $value The hash array to dump + * @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string + */ + private static function dumpHashArray(array|\ArrayObject|\stdClass $value, int $flags): string + { $output = []; foreach ($value as $key => $val) { + if (\is_int($key) && Yaml::DUMP_NUMERIC_KEY_AS_STRING & $flags) { + $key = (string) $key; + } + $output[] = sprintf('%s: %s', self::dump($key, $flags), self::dump($val, $flags)); } @@ -265,11 +265,9 @@ class Inline /** * Parses a YAML scalar. * - * @return mixed - * * @throws ParseException When malformed inline YAML string is parsed */ - public static function parseScalar(string $scalar, int $flags = 0, array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], bool &$isQuoted = null) + public static function parseScalar(string $scalar, int $flags = 0, ?array $delimiters = null, int &$i = 0, bool $evaluate = true, array &$references = [], ?bool &$isQuoted = null): mixed { if (\in_array($scalar[$i], ['"', "'"], true)) { // quoted scalar @@ -379,12 +377,12 @@ class Inline $value = self::parseScalar($sequence, $flags, [',', ']'], $i, null === $tag, $references, $isQuoted); // the value can be an array if a reference has been resolved to an array var - if (\is_string($value) && !$isQuoted && false !== strpos($value, ': ')) { + if (\is_string($value) && !$isQuoted && str_contains($value, ': ')) { // embedded mapping? try { $pos = 0; $value = self::parseMapping('{'.$value.'}', $flags, $pos, $references); - } catch (\InvalidArgumentException $e) { + } catch (\InvalidArgumentException) { // no, it's not } } @@ -412,11 +410,9 @@ class Inline /** * Parses a YAML mapping. * - * @return array|\stdClass - * * @throws ParseException When malformed inline YAML string is parsed */ - private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []) + private static function parseMapping(string $mapping, int $flags, int &$i = 0, array &$references = []): array|\stdClass { $output = []; $len = \strlen($mapping); @@ -448,7 +444,7 @@ class Inline throw new ParseException('Missing mapping key.', self::$parsedLineNumber + 1, $mapping); } - if ('!php/const' === $key) { + if ('!php/const' === $key || '!php/enum' === $key) { $key .= ' '.self::parseScalar($mapping, $flags, [':'], $i, false); $key = self::evaluateScalar($key, $flags); } @@ -531,7 +527,7 @@ class Inline if ('<<' === $key) { $output += $value; } elseif ($allowOverwrite || !isset($output[$key])) { - if (!$isValueQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { + if (!$isValueQuoted && \is_string($value) && '' !== $value && '&' === $value[0] && !self::isBinaryString($value) && Parser::preg_match(Parser::REFERENCE_PATTERN, $value, $matches)) { $references[$matches['ref']] = $matches['value']; $value = $matches['value']; } @@ -558,16 +554,14 @@ class Inline /** * Evaluates scalars and replaces magic values. * - * @return mixed - * * @throws ParseException when object parsing support was disabled and the parser detected a PHP object or when a reference could not be resolved */ - private static function evaluateScalar(string $scalar, int $flags, array &$references = [], bool &$isQuotedString = null) + private static function evaluateScalar(string $scalar, int $flags, array &$references = [], ?bool &$isQuotedString = null): mixed { $isQuotedString = false; $scalar = trim($scalar); - if (0 === strpos($scalar, '*')) { + if (str_starts_with($scalar, '*')) { if (false !== $pos = strpos($scalar, '#')) { $value = substr($scalar, 1, $pos - 2); } else { @@ -599,7 +593,7 @@ class Inline return false; case '!' === $scalar[0]: switch (true) { - case 0 === strpos($scalar, '!!str '): + case str_starts_with($scalar, '!!str '): $s = (string) substr($scalar, 6); if (\in_array($s[0] ?? '', ['"', "'"], true)) { @@ -608,14 +602,12 @@ class Inline } return $s; - case 0 === strpos($scalar, '! '): + case str_starts_with($scalar, '! '): return substr($scalar, 2); - case 0 === strpos($scalar, '!php/object'): + case str_starts_with($scalar, '!php/object'): if (self::$objectSupport) { if (!isset($scalar[12])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/object tag without a value is deprecated.'); - - return false; + throw new ParseException('Missing value for tag "!php/object".', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return unserialize(self::parseScalar(substr($scalar, 12))); @@ -626,12 +618,10 @@ class Inline } return null; - case 0 === strpos($scalar, '!php/const'): + case str_starts_with($scalar, '!php/const'): if (self::$constantSupport) { if (!isset($scalar[11])) { - trigger_deprecation('symfony/yaml', '5.1', 'Using the !php/const tag without a value is deprecated.'); - - return ''; + throw new ParseException('Missing value for tag "!php/const".', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } $i = 0; @@ -646,9 +636,43 @@ class Inline } return null; - case 0 === strpos($scalar, '!!float '): + case str_starts_with($scalar, '!php/enum'): + if (self::$constantSupport) { + if (!isset($scalar[11])) { + throw new ParseException('Missing value for tag "!php/enum".', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + $i = 0; + $enum = self::parseScalar(substr($scalar, 10), 0, null, $i, false); + if ($useValue = str_ends_with($enum, '->value')) { + $enum = substr($enum, 0, -7); + } + if (!\defined($enum)) { + throw new ParseException(sprintf('The enum "%s" is not defined.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + $value = \constant($enum); + + if (!$value instanceof \UnitEnum) { + throw new ParseException(sprintf('The string "%s" is not the name of a valid enum.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + if (!$useValue) { + return $value; + } + if (!$value instanceof \BackedEnum) { + throw new ParseException(sprintf('The enum "%s" defines no value next to its name.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + return $value->value; + } + if (self::$exceptionOnInvalidType) { + throw new ParseException(sprintf('The string "%s" could not be parsed as an enum. Did you forget to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + return null; + case str_starts_with($scalar, '!!float '): return (float) substr($scalar, 8); - case 0 === strpos($scalar, '!!binary '): + case str_starts_with($scalar, '!!binary '): return self::evaluateBinaryScalar(substr($scalar, 9)); } @@ -668,22 +692,7 @@ class Inline switch (true) { case ctype_digit($scalar): - if (preg_match('/^0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '0o'.substr($scalar, 1)); - - return octdec($scalar); - } - - $cast = (int) $scalar; - - return ($scalar === (string) $cast) ? $cast : $scalar; case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): - if (preg_match('/^-0[0-7]+$/', $scalar)) { - trigger_deprecation('symfony/yaml', '5.1', 'Support for parsing numbers prefixed with 0 as octal numbers. They will be parsed as strings as of 6.0. Use "%s" to represent the octal number.', '-0o'.substr($scalar, 2)); - - return -octdec(substr($scalar, 1)); - } - $cast = (int) $scalar; return ($scalar === (string) $cast) ? $cast : $scalar; @@ -701,17 +710,21 @@ class Inline return (float) str_replace('_', '', $scalar); case Parser::preg_match(self::getTimestampRegex(), $scalar): // When no timezone is provided in the parsed date, YAML spec says we must assume UTC. - $time = new \DateTime($scalar, new \DateTimeZone('UTC')); + $time = new \DateTimeImmutable($scalar, new \DateTimeZone('UTC')); if (Yaml::PARSE_DATETIME & $flags) { return $time; } + if ('' !== rtrim($time->format('u'), '0')) { + return (float) $time->format('U.u'); + } + try { if (false !== $scalar = $time->getTimestamp()) { return $scalar; } - } catch (\ValueError $e) { + } catch (\ValueError) { // no-op } @@ -739,7 +752,7 @@ class Inline } // Is followed by a scalar and is a built-in tag - if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || 'str' === $tag || 'php/const' === $tag || 'php/object' === $tag)) { + if ('' !== $tag && (!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && ('!' === $tag[0] || \in_array($tag, ['str', 'php/const', 'php/enum', 'php/object'], true))) { // Manage in {@link self::evaluateScalar()} return null; } diff --git a/kirby/vendor/symfony/yaml/Parser.php b/kirby/vendor/symfony/yaml/Parser.php index d8886bb..2a15bca 100644 --- a/kirby/vendor/symfony/yaml/Parser.php +++ b/kirby/vendor/symfony/yaml/Parser.php @@ -27,17 +27,17 @@ class Parser public const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; public const REFERENCE_PATTERN = '#^&(?P[^ ]++) *+(?P.*)#u'; - private $filename; - private $offset = 0; - private $numberOfParsedLines = 0; - private $totalNumberOfLines; - private $lines = []; - private $currentLineNb = -1; - private $currentLine = ''; - private $refs = []; - private $skippedLineNumbers = []; - private $locallySkippedLineNumbers = []; - private $refsBeingParsed = []; + private ?string $filename = null; + private int $offset = 0; + private int $numberOfParsedLines = 0; + private ?int $totalNumberOfLines = null; + private array $lines = []; + private int $currentLineNb = -1; + private string $currentLine = ''; + private array $refs = []; + private array $skippedLineNumbers = []; + private array $locallySkippedLineNumbers = []; + private array $refsBeingParsed = []; /** * Parses a YAML file into a PHP value. @@ -45,11 +45,9 @@ class Parser * @param string $filename The path to the YAML file to be parsed * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * - * @return mixed - * * @throws ParseException If the file could not be read or the YAML is not valid */ - public function parseFile(string $filename, int $flags = 0) + public function parseFile(string $filename, int $flags = 0): mixed { if (!is_file($filename)) { throw new ParseException(sprintf('File "%s" does not exist.', $filename)); @@ -74,11 +72,9 @@ class Parser * @param string $value A YAML string * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * - * @return mixed - * * @throws ParseException If the YAML is not valid */ - public function parse(string $value, int $flags = 0) + public function parse(string $value, int $flags = 0): mixed { if (false === preg_match('//u', $value)) { throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); @@ -86,19 +82,9 @@ class Parser $this->refs = []; - $mbEncoding = null; - - if (2 /* MB_OVERLOAD_STRING */ & (int) \ini_get('mbstring.func_overload')) { - $mbEncoding = mb_internal_encoding(); - mb_internal_encoding('UTF-8'); - } - try { $data = $this->doParse($value, $flags); } finally { - if (null !== $mbEncoding) { - mb_internal_encoding($mbEncoding); - } $this->refsBeingParsed = []; $this->offset = 0; $this->lines = []; @@ -113,7 +99,7 @@ class Parser return $data; } - private function doParse(string $value, int $flags) + private function doParse(string $value, int $flags): mixed { $this->currentLineNb = -1; $this->currentLine = ''; @@ -121,10 +107,7 @@ class Parser $this->lines = explode("\n", $value); $this->numberOfParsedLines = \count($this->lines); $this->locallySkippedLineNumbers = []; - - if (null === $this->totalNumberOfLines) { - $this->totalNumberOfLines = $this->numberOfParsedLines; - } + $this->totalNumberOfLines ??= $this->numberOfParsedLines; if (!$this->moveToNextLine()) { return null; @@ -175,7 +158,7 @@ class Parser } // array - if (isset($values['value']) && 0 === strpos(ltrim($values['value'], ' '), '-')) { + if (isset($values['value']) && str_starts_with(ltrim($values['value'], ' '), '-')) { // Inline first child $currentLineNumber = $this->getRealCurrentLineNb(); @@ -184,7 +167,7 @@ class Parser $sequenceYaml .= "\n".$this->getNextEmbedBlock($sequenceIndentation, true); $data[] = $this->parseBlock($currentLineNumber, rtrim($sequenceYaml), $flags); - } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { + } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || str_starts_with(ltrim($values['value'], ' '), '#')) { $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true) ?? '', $flags); } elseif (null !== $subTag = $this->getLineTag(ltrim($values['value'], ' '), $flags)) { $data[] = new TaggedValue( @@ -199,9 +182,8 @@ class Parser || self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $this->trimTag($values['value']), $matches) ) ) { - // this is a compact notation element, add to next block and parse $block = $values['value']; - if ($this->isNextLineIndented()) { + if ($this->isNextLineIndented() || isset($matches['value']) && '>-' === $matches['value']) { $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + \strlen($values['leadspaces']) + 1); } @@ -215,9 +197,14 @@ class Parser array_pop($this->refsBeingParsed); } } elseif ( + // @todo in 7.0 remove legacy "(?:!?!php/const:)?" self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(( |\t)++(?P.+))?$#u', rtrim($this->currentLine), $values) - && (false === strpos($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) + && (!str_contains($values['key'], ' #') || \in_array($values['key'][0], ['"', "'"])) ) { + if (str_starts_with($values['key'], '!php/const:')) { + trigger_deprecation('symfony/yaml', '6.2', 'YAML syntax for key "%s" is deprecated and replaced by "!php/const %s".', $values['key'], substr($values['key'], 11)); + } + if ($context && 'sequence' == $context) { throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } @@ -311,7 +298,7 @@ class Parser $subTag = null; if ($mergeNode) { // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { + } elseif (!isset($values['value']) || '' === $values['value'] || str_starts_with($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { // hash // if next line is less indented or equal, then it means that the current value is null if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { @@ -459,7 +446,7 @@ class Parser throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } - if (false !== strpos($line, ': ')) { + if (str_contains($line, ': ')) { throw new ParseException('Mapping values are not allowed in multi-line blocks.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } @@ -469,7 +456,7 @@ class Parser $value .= ' '; } - if ('' !== $trimmedLine && '\\' === substr($line, -1)) { + if ('' !== $trimmedLine && str_ends_with($line, '\\')) { $value .= ltrim(substr($line, 0, -1)); } elseif ('' !== $trimmedLine) { $value .= $trimmedLine; @@ -478,7 +465,7 @@ class Parser if ('' === $trimmedLine) { $previousLineWasNewline = true; $previousLineWasTerminatedWithBackslash = false; - } elseif ('\\' === substr($line, -1)) { + } elseif (str_ends_with($line, '\\')) { $previousLineWasNewline = false; $previousLineWasTerminatedWithBackslash = true; } else { @@ -489,7 +476,7 @@ class Parser try { return Inline::parse(trim($value)); - } catch (ParseException $e) { + } catch (ParseException) { // fall-through to the ParseException thrown below } } @@ -515,7 +502,7 @@ class Parser return empty($data) ? null : $data; } - private function parseBlock(int $offset, string $yaml, int $flags) + private function parseBlock(int $offset, string $yaml, int $flags): mixed { $skippedLineNumbers = $this->skippedLineNumbers; @@ -557,9 +544,6 @@ class Parser return $realCurrentLineNumber; } - /** - * Returns the current line indentation. - */ private function getCurrentLineIndentation(): int { if (' ' !== ($this->currentLine[0] ?? '')) { @@ -577,7 +561,7 @@ class Parser * * @throws ParseException When indentation problem are detected */ - private function getNextEmbedBlock(int $indentation = null, bool $inSequence = false): string + private function getNextEmbedBlock(?int $indentation = null, bool $inSequence = false): string { $oldLineIndentation = $this->getCurrentLineIndentation(); @@ -654,12 +638,12 @@ class Parser } if ($this->isCurrentLineBlank()) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); continue; } if ($indent >= $newIndent) { - $data[] = substr($this->currentLine, $newIndent); + $data[] = substr($this->currentLine, $newIndent ?? 0); } elseif ($this->isCurrentLineComment()) { $data[] = $this->currentLine; } elseif (0 == $indent) { @@ -714,13 +698,11 @@ class Parser * @param int $flags A bit field of Yaml::PARSE_* constants to customize the YAML parser behavior * @param string $context The parser context (either sequence or mapping) * - * @return mixed - * * @throws ParseException When reference does not exist */ - private function parseValue(string $value, int $flags, string $context) + private function parseValue(string $value, int $flags, string $context): mixed { - if (0 === strpos($value, '*')) { + if (str_starts_with($value, '*')) { if (false !== $pos = strpos($value, '#')) { $value = substr($value, 1, $pos - 2); } else { @@ -807,7 +789,7 @@ class Parser $parsedValue = Inline::parse($value, $flags, $this->refs); - if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { + if ('mapping' === $context && \is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && str_contains($parsedValue, ': ')) { throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); } @@ -861,8 +843,8 @@ class Parser while ( $notEOF && ( - $isCurrentLineBlank || - self::preg_match($pattern, $this->currentLine, $matches) + $isCurrentLineBlank + || self::preg_match($pattern, $this->currentLine, $matches) ) ) { if ($isCurrentLineBlank && \strlen($this->currentLine) > $indentation) { @@ -949,6 +931,10 @@ class Parser } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); if ($EOF) { + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } + return false; } @@ -961,25 +947,16 @@ class Parser return $ret; } - /** - * Returns true if the current line is blank or if it is a comment line. - */ private function isCurrentLineEmpty(): bool { return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); } - /** - * Returns true if the current line is blank. - */ private function isCurrentLineBlank(): bool { return '' === $this->currentLine || '' === trim($this->currentLine, ' '); } - /** - * Returns true if the current line is a comment line. - */ private function isCurrentLineComment(): bool { // checking explicitly the first char of the trim is faster than loops or strpos @@ -993,11 +970,6 @@ class Parser return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); } - /** - * Cleanups a YAML string to be parsed. - * - * @param string $value The input YAML string - */ private function cleanup(string $value): string { $value = str_replace(["\r\n", "\r"], "\n", $value); @@ -1029,9 +1001,6 @@ class Parser return $value; } - /** - * Returns true if the next line starts unindented collection. - */ private function isNextLineUnIndentedCollection(): bool { $currentIndentation = $this->getCurrentLineIndentation(); @@ -1058,12 +1027,9 @@ class Parser return $ret; } - /** - * Returns true if the string is un-indented collection item. - */ private function isStringUnIndentedCollectionItem(): bool { - return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); + return '-' === rtrim($this->currentLine) || str_starts_with($this->currentLine, '- '); } /** @@ -1075,34 +1041,12 @@ class Parser * * @throws ParseException on a PCRE internal error * - * @see preg_last_error() - * * @internal */ - public static function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int + public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int { if (false === $ret = preg_match($pattern, $subject, $matches, $flags, $offset)) { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - $error = 'Internal PCRE error.'; - break; - case \PREG_BACKTRACK_LIMIT_ERROR: - $error = 'pcre.backtrack_limit reached.'; - break; - case \PREG_RECURSION_LIMIT_ERROR: - $error = 'pcre.recursion_limit reached.'; - break; - case \PREG_BAD_UTF8_ERROR: - $error = 'Malformed UTF-8 data.'; - break; - case \PREG_BAD_UTF8_OFFSET_ERROR: - $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point.'; - break; - default: - $error = 'Error.'; - } - - throw new ParseException($error); + throw new ParseException(preg_last_error_msg()); } return $ret; diff --git a/kirby/vendor/symfony/yaml/Tag/TaggedValue.php b/kirby/vendor/symfony/yaml/Tag/TaggedValue.php index 4ea3406..3e09b93 100644 --- a/kirby/vendor/symfony/yaml/Tag/TaggedValue.php +++ b/kirby/vendor/symfony/yaml/Tag/TaggedValue.php @@ -17,10 +17,10 @@ namespace Symfony\Component\Yaml\Tag; */ final class TaggedValue { - private $tag; - private $value; + private string $tag; + private mixed $value; - public function __construct(string $tag, $value) + public function __construct(string $tag, mixed $value) { $this->tag = $tag; $this->value = $value; @@ -31,7 +31,7 @@ final class TaggedValue return $this->tag; } - public function getValue() + public function getValue(): mixed { return $this->value; } diff --git a/kirby/vendor/symfony/yaml/Unescaper.php b/kirby/vendor/symfony/yaml/Unescaper.php index d1ef041..9e640ff 100644 --- a/kirby/vendor/symfony/yaml/Unescaper.php +++ b/kirby/vendor/symfony/yaml/Unescaper.php @@ -45,9 +45,7 @@ class Unescaper */ public function unescapeDoubleQuotedString(string $value): string { - $callback = function ($match) { - return $this->unescapeCharacter($match[0]); - }; + $callback = fn ($match) => $this->unescapeCharacter($match[0]); // evaluate the string return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value); @@ -60,56 +58,34 @@ class Unescaper */ private function unescapeCharacter(string $value): string { - switch ($value[1]) { - case '0': - return "\x0"; - case 'a': - return "\x7"; - case 'b': - return "\x8"; - case 't': - return "\t"; - case "\t": - return "\t"; - case 'n': - return "\n"; - case 'v': - return "\xB"; - case 'f': - return "\xC"; - case 'r': - return "\r"; - case 'e': - return "\x1B"; - case ' ': - return ' '; - case '"': - return '"'; - case '/': - return '/'; - case '\\': - return '\\'; - case 'N': - // U+0085 NEXT LINE - return "\xC2\x85"; - case '_': - // U+00A0 NO-BREAK SPACE - return "\xC2\xA0"; - case 'L': - // U+2028 LINE SEPARATOR - return "\xE2\x80\xA8"; - case 'P': - // U+2029 PARAGRAPH SEPARATOR - return "\xE2\x80\xA9"; - case 'x': - return self::utf8chr(hexdec(substr($value, 2, 2))); - case 'u': - return self::utf8chr(hexdec(substr($value, 2, 4))); - case 'U': - return self::utf8chr(hexdec(substr($value, 2, 8))); - default: - throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); - } + return match ($value[1]) { + '0' => "\x0", + 'a' => "\x7", + 'b' => "\x8", + 't' => "\t", + "\t" => "\t", + 'n' => "\n", + 'v' => "\xB", + 'f' => "\xC", + 'r' => "\r", + 'e' => "\x1B", + ' ' => ' ', + '"' => '"', + '/' => '/', + '\\' => '\\', + // U+0085 NEXT LINE + 'N' => "\xC2\x85", + // U+00A0 NO-BREAK SPACE + '_' => "\xC2\xA0", + // U+2028 LINE SEPARATOR + 'L' => "\xE2\x80\xA8", + // U+2029 PARAGRAPH SEPARATOR + 'P' => "\xE2\x80\xA9", + 'x' => self::utf8chr(hexdec(substr($value, 2, 2))), + 'u' => self::utf8chr(hexdec(substr($value, 2, 4))), + 'U' => self::utf8chr(hexdec(substr($value, 2, 8))), + default => throw new ParseException(sprintf('Found unknown escape character "%s".', $value)), + }; } /** diff --git a/kirby/vendor/symfony/yaml/Yaml.php b/kirby/vendor/symfony/yaml/Yaml.php index ea13045..e2d2af7 100644 --- a/kirby/vendor/symfony/yaml/Yaml.php +++ b/kirby/vendor/symfony/yaml/Yaml.php @@ -34,6 +34,7 @@ class Yaml public const PARSE_CUSTOM_TAGS = 512; public const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; public const DUMP_NULL_AS_TILDE = 2048; + public const DUMP_NUMERIC_KEY_AS_STRING = 4096; /** * Parses a YAML file into a PHP value. @@ -46,11 +47,9 @@ class Yaml * @param string $filename The path to the YAML file to be parsed * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior * - * @return mixed - * * @throws ParseException If the file could not be read or the YAML is not valid */ - public static function parseFile(string $filename, int $flags = 0) + public static function parseFile(string $filename, int $flags = 0): mixed { $yaml = new Parser(); @@ -69,11 +68,9 @@ class Yaml * @param string $input A string containing YAML * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior * - * @return mixed - * * @throws ParseException If the YAML is not valid */ - public static function parse(string $input, int $flags = 0) + public static function parse(string $input, int $flags = 0): mixed { $yaml = new Parser(); @@ -91,7 +88,7 @@ class Yaml * @param int $indent The amount of spaces to use for indentation of nested nodes * @param int $flags A bit field of DUMP_* constants to customize the dumped YAML string */ - public static function dump($input, int $inline = 2, int $indent = 4, int $flags = 0): string + public static function dump(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0): string { $yaml = new Dumper($indent); diff --git a/kirby/vendor/symfony/yaml/composer.json b/kirby/vendor/symfony/yaml/composer.json index 7fa6e2c..7dfb7d0 100644 --- a/kirby/vendor/symfony/yaml/composer.json +++ b/kirby/vendor/symfony/yaml/composer.json @@ -16,18 +16,15 @@ } ], "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony/console": "^5.3|^6.0" + "symfony/console": "^5.4|^6.0|^7.0" }, "conflict": { - "symfony/console": "<5.3" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "symfony/console": "<5.4" }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" },