Update Kirby and dependencies

This commit is contained in:
Paul Nicoué 2022-06-17 18:02:55 +02:00
parent 750b9cc83e
commit 8c71a258b6
59 changed files with 2143 additions and 813 deletions

View file

@ -178,36 +178,36 @@
},
{
"name": "laminas/laminas-escaper",
"version": "2.9.0",
"version_normalized": "2.9.0.0",
"version": "2.10.0",
"version_normalized": "2.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f"
"reference": "58af67282db37d24e584a837a94ee55b9c7552be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f",
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/58af67282db37d24e584a837a94ee55b9c7552be",
"reference": "58af67282db37d24e584a837a94ee55b9c7552be",
"shasum": ""
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
"ext-ctype": "*",
"ext-mbstring": "*",
"php": "^7.4 || ~8.0.0 || ~8.1.0"
},
"conflict": {
"zendframework/zend-escaper": "*"
},
"require-dev": {
"infection/infection": "^0.26.6",
"laminas/laminas-coding-standard": "~2.3.0",
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.12.2",
"vimeo/psalm": "^3.16"
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.5.18",
"psalm/plugin-phpunit": "^0.16.1",
"vimeo/psalm": "^4.22.0"
},
"suggest": {
"ext-iconv": "*",
"ext-mbstring": "*"
},
"time": "2021-09-02T17:10:53+00:00",
"time": "2022-03-08T20:15:36+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -495,8 +495,8 @@
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.24.0",
"version_normalized": "1.24.0.0",
"version": "v1.25.0",
"version_normalized": "1.25.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
@ -529,12 +529,12 @@
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -565,7 +565,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0"
},
"funding": [
{
@ -672,8 +672,8 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.24.0",
"version_normalized": "1.24.0.0",
"version": "v1.25.0",
"version_normalized": "1.25.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
@ -707,12 +707,12 @@
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -738,7 +738,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
},
"funding": [
{

View file

@ -1,7 +1,7 @@
<?php return array(
'root' => array(
'pretty_version' => '3.6.3',
'version' => '3.6.3.0',
'pretty_version' => '3.6.6',
'version' => '3.6.6.0',
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -29,8 +29,8 @@
'dev_requirement' => false,
),
'getkirby/cms' => array(
'pretty_version' => '3.6.3',
'version' => '3.6.3.0',
'pretty_version' => '3.6.6',
'version' => '3.6.6.0',
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -47,12 +47,12 @@
'dev_requirement' => false,
),
'laminas/laminas-escaper' => array(
'pretty_version' => '2.9.0',
'version' => '2.9.0.0',
'pretty_version' => '2.10.0',
'version' => '2.10.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-escaper',
'aliases' => array(),
'reference' => '891ad70986729e20ed2e86355fcf93c9dc238a5f',
'reference' => '58af67282db37d24e584a837a94ee55b9c7552be',
'dev_requirement' => false,
),
'league/color-extractor' => array(
@ -98,8 +98,8 @@
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' => array(
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'pretty_version' => 'v1.25.0',
'version' => '1.25.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
'aliases' => array(),
@ -116,8 +116,8 @@
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.24.0',
'version' => '1.24.0.0',
'pretty_version' => 'v1.25.0',
'version' => '1.25.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),

View file

@ -16,22 +16,30 @@
"forum": "https://discourse.laminas.dev"
},
"config": {
"sort-packages": true
"sort-packages": true,
"platform": {
"php": "7.4.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/package-versions-deprecated": true,
"infection/extension-installer": true
}
},
"extra": {
},
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0"
},
"suggest": {
"ext-iconv": "*",
"php": "^7.4 || ~8.0.0 || ~8.1.0",
"ext-ctype": "*",
"ext-mbstring": "*"
},
"require-dev": {
"infection/infection": "^0.26.6",
"laminas/laminas-coding-standard": "~2.3.0",
"phpunit/phpunit": "^9.3",
"psalm/plugin-phpunit": "^0.12.2",
"vimeo/psalm": "^3.16"
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.5.18",
"psalm/plugin-phpunit": "^0.16.1",
"vimeo/psalm": "^4.22.0"
},
"autoload": {
"psr-4": {

File diff suppressed because it is too large Load diff

View file

@ -6,10 +6,8 @@ namespace Laminas\Escaper;
use function bin2hex;
use function ctype_digit;
use function function_exists;
use function hexdec;
use function htmlspecialchars;
use function iconv;
use function in_array;
use function mb_convert_encoding;
use function ord;
@ -38,7 +36,7 @@ class Escaper
* entities that XML supports. Using HTML entities would result in this error:
* XML Parsing Error: undefined entity
*
* @var array
* @var array<int, string>
*/
protected static $htmlNamedEntityMap = [
34 => 'quot', // quotation mark
@ -67,6 +65,7 @@ class Escaper
* Static Matcher which escapes characters for HTML Attribute contexts
*
* @var callable
* @psalm-var callable(array<array-key, string>):string
*/
protected $htmlAttrMatcher;
@ -74,6 +73,7 @@ class Escaper
* Static Matcher which escapes characters for Javascript contexts
*
* @var callable
* @psalm-var callable(array<array-key, string>):string
*/
protected $jsMatcher;
@ -81,6 +81,7 @@ class Escaper
* Static Matcher which escapes characters for CSS Attribute contexts
*
* @var callable
* @psalm-var callable(array<array-key, string>):string
*/
protected $cssMatcher;
@ -255,7 +256,7 @@ class Escaper
* Callback function for preg_replace_callback that applies HTML Attribute
* escaping to all matches.
*
* @param array $matches
* @param array<array-key, string> $matches
* @return string
*/
protected function htmlAttrMatcher($matches)
@ -302,7 +303,7 @@ class Escaper
* Callback function for preg_replace_callback that applies Javascript
* escaping to all matches.
*
* @param array $matches
* @param array<array-key, string> $matches
* @return string
*/
protected function jsMatcher($matches)
@ -325,7 +326,7 @@ class Escaper
* Callback function for preg_replace_callback that applies CSS
* escaping to all matches.
*
* @param array $matches
* @param array<array-key, string> $matches
* @return string
*/
protected function cssMatcher($matches)
@ -391,32 +392,21 @@ class Escaper
}
/**
* Encoding conversion helper which wraps iconv and mbstring where they exist or throws
* and exception where neither is available.
* Encoding conversion helper which wraps mb_convert_encoding
*
* @param string $string
* @param string $to
* @param array|string $from
* @throws Exception\RuntimeException
* @return string
*/
protected function convertEncoding($string, $to, $from)
{
if (function_exists('iconv')) {
$result = iconv($from, $to, $string);
} elseif (function_exists('mb_convert_encoding')) {
$result = mb_convert_encoding($string, $to, $from);
} else {
throw new Exception\RuntimeException(
static::class
. ' requires either the iconv or mbstring extension to be installed'
. ' when escaping for non UTF-8 strings.'
);
}
$result = mb_convert_encoding($string, $to, $from);
if ($result === false) {
return ''; // return non-fatal blank string on encoding errors from users
}
return $result;
}
}