fix #72 - update to Kirby 4.5
This commit is contained in:
parent
cb1f842fc9
commit
44d08b3e21
273 changed files with 678 additions and 54176 deletions
|
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
"require": {
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
|
||||
"getkirby/cms": "^4.0",
|
||||
"getkirby/cms": "^4.5",
|
||||
"getkirby/kql": "^1.2"
|
||||
},
|
||||
"config": {
|
||||
|
|
|
|||
215
public/composer.lock
generated
215
public/composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "45a7afdac49ac63b55055018fb1e8d5a",
|
||||
"content-hash": "8f2fa8b1557df883bef5b3425ee05c4c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "christian-riesen/base32",
|
||||
|
|
@ -120,24 +120,24 @@
|
|||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
|
||||
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
|
||||
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
|
||||
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"symfony/phpunit-bridge": "^3 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
"support": {
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.4.0"
|
||||
"source": "https://github.com/composer/semver/tree/3.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -197,30 +197,30 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-08-31T09:50:34+00:00"
|
||||
"time": "2024-09-19T14:15:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.15.4",
|
||||
"version": "2.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
|
||||
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9 || ^7.0 || ^8.0",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
|
||||
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
|
||||
"symfony/var-dumper": "^4.0 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/filp/whoops/issues",
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.4"
|
||||
"source": "https://github.com/filp/whoops/tree/2.16.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -268,26 +268,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-03T12:00:00+00:00"
|
||||
"time": "2024-09-25T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "getkirby/cms",
|
||||
"version": "4.3.0",
|
||||
"version": "4.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/getkirby/kirby.git",
|
||||
"reference": "f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9"
|
||||
"reference": "94cc37ee7c3004ebb4950a53f14e1329ed4d28d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/getkirby/kirby/zipball/f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9",
|
||||
"reference": "f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9",
|
||||
"url": "https://api.github.com/repos/getkirby/kirby/zipball/94cc37ee7c3004ebb4950a53f14e1329ed4d28d3",
|
||||
"reference": "94cc37ee7c3004ebb4950a53f14e1329ed4d28d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"christian-riesen/base32": "1.6.0",
|
||||
"claviska/simpleimage": "4.2.0",
|
||||
"composer/semver": "3.4.0",
|
||||
"composer/semver": "3.4.3",
|
||||
"ext-ctype": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-dom": "*",
|
||||
|
|
@ -299,15 +299,15 @@
|
|||
"ext-mbstring": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-simplexml": "*",
|
||||
"filp/whoops": "2.15.4",
|
||||
"filp/whoops": "2.16.0",
|
||||
"getkirby/composer-installer": "^1.2.1",
|
||||
"laminas/laminas-escaper": "2.13.0",
|
||||
"laminas/laminas-escaper": "2.14.0",
|
||||
"michelf/php-smartypants": "1.8.1",
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
|
||||
"phpmailer/phpmailer": "6.9.1",
|
||||
"symfony/polyfill-intl-idn": "1.29.0",
|
||||
"symfony/polyfill-mbstring": "1.29.0",
|
||||
"symfony/yaml": "6.4.8"
|
||||
"phpmailer/phpmailer": "6.9.2",
|
||||
"symfony/polyfill-intl-idn": "1.31.0",
|
||||
"symfony/polyfill-mbstring": "1.31.0",
|
||||
"symfony/yaml": "6.4.13"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*"
|
||||
|
|
@ -371,7 +371,7 @@
|
|||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2024-06-13T09:58:27+00:00"
|
||||
"time": "2024-11-28T10:10:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "getkirby/composer-installer",
|
||||
|
|
@ -477,33 +477,33 @@
|
|||
},
|
||||
{
|
||||
"name": "laminas/laminas-escaper",
|
||||
"version": "2.13.0",
|
||||
"version": "2.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laminas/laminas-escaper.git",
|
||||
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba"
|
||||
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba",
|
||||
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/0f7cb975f4443cf22f33408925c231225cfba8cb",
|
||||
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-mbstring": "*",
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"zendframework/zend-escaper": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"infection/infection": "^0.27.0",
|
||||
"laminas/laminas-coding-standard": "~2.5.0",
|
||||
"infection/infection": "^0.27.9",
|
||||
"laminas/laminas-coding-standard": "~3.0.0",
|
||||
"maglnet/composer-require-checker": "^3.8.0",
|
||||
"phpunit/phpunit": "^9.6.7",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"vimeo/psalm": "^5.9"
|
||||
"phpunit/phpunit": "^9.6.16",
|
||||
"psalm/plugin-phpunit": "^0.19.0",
|
||||
"vimeo/psalm": "^5.21.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
|
@ -535,7 +535,7 @@
|
|||
"type": "community_bridge"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-10T08:35:13+00:00"
|
||||
"time": "2024-10-24T10:12:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/color-extractor",
|
||||
|
|
@ -654,16 +654,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.9.1",
|
||||
"version": "v6.9.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18"
|
||||
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18",
|
||||
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a7b17b42fa4887c92146243f3d2f4ccb962af17c",
|
||||
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -723,7 +723,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.9.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -731,20 +731,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-25T22:23:28+00:00"
|
||||
"time": "2024-10-09T10:07:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
|
||||
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
||||
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -779,22 +779,22 @@
|
|||
"psr-3"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/log/tree/3.0.0"
|
||||
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||
},
|
||||
"time": "2021-07-14T16:46:02+00:00"
|
||||
"time": "2024-09-11T13:17:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v3.5.0",
|
||||
"version": "v3.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
|
||||
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -802,12 +802,12 @@
|
|||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/contracts",
|
||||
"name": "symfony/contracts"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "3.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -832,7 +832,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.5.0"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -848,24 +848,24 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-04-18T09:32:20+00:00"
|
||||
"time": "2024-09-25T14:20:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.30.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "0424dff1c58f028c451efff2045f5d92410bd540"
|
||||
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540",
|
||||
"reference": "0424dff1c58f028c451efff2045f5d92410bd540",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"provide": {
|
||||
"ext-ctype": "*"
|
||||
|
|
@ -876,8 +876,8 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -911,7 +911,7 @@
|
|||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0"
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -927,26 +927,25 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-05-31T15:07:36+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.29.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "a287ed7475f85bf6f61890146edbc932c0fff919"
|
||||
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919",
|
||||
"reference": "a287ed7475f85bf6f61890146edbc932c0fff919",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||
"symfony/polyfill-php72": "^1.10"
|
||||
"php": ">=7.2",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
|
|
@ -954,8 +953,8 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -995,7 +994,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1011,24 +1010,24 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-29T20:11:03+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.30.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb"
|
||||
"reference": "3833d7255cc303546435cb650316bff708a1c75c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb",
|
||||
"reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
|
||||
"reference": "3833d7255cc303546435cb650316bff708a1c75c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
|
|
@ -1036,8 +1035,8 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -1076,7 +1075,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1092,24 +1091,24 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-05-31T15:07:36+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.29.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
|
||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
|
||||
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
|
|
@ -1120,8 +1119,8 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
@ -1156,7 +1155,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1172,20 +1171,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-29T20:11:03+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v6.4.8",
|
||||
"version": "v6.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "52903de178d542850f6f341ba92995d3d63e60c9"
|
||||
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/52903de178d542850f6f341ba92995d3d63e60c9",
|
||||
"reference": "52903de178d542850f6f341ba92995d3d63e60c9",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
|
||||
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1228,7 +1227,7 @@
|
|||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/yaml/tree/v6.4.8"
|
||||
"source": "https://github.com/symfony/yaml/tree/v6.4.13"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1244,7 +1243,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-05-31T14:49:08+00:00"
|
||||
"time": "2024-09-25T14:18:03+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
##
|
||||
## Bundle of CA Root Certificates
|
||||
##
|
||||
## Certificate data from Mozilla as of: Tue Jul 2 03:12:04 2024 GMT
|
||||
## Certificate data from Mozilla as of: Tue Nov 26 13:58:25 2024 GMT
|
||||
##
|
||||
## Find updated versions here: https://curl.se/docs/caextract.html
|
||||
##
|
||||
## This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
## (CA). These were automatically extracted from Mozilla's root certificates
|
||||
|
|
@ -14,7 +16,7 @@
|
|||
## Just configure this file as the SSLCACertificateFile.
|
||||
##
|
||||
## Conversion done with mk-ca-bundle.pl version 1.29.
|
||||
## SHA256: 456ff095dde6dd73354c5c28c73d9c06f53b61a803963414cb91a1d92945cdd3
|
||||
## SHA256: 36105b01631f9fc03b1eca779b44a30a1a5890b9bf8dc07ccb001a07301e01cf
|
||||
##
|
||||
|
||||
|
||||
|
|
@ -2600,6 +2602,36 @@ vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
|
|||
CAezNIm8BZ/3Hobui3A=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GLOBALTRUST 2020
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
|
||||
IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
|
||||
VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh
|
||||
BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy
|
||||
MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi
|
||||
D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO
|
||||
VPu44sB8R85gfD+yc/LAGbaKkoc1DZAoouQVBGM+uq/ufF7MpotQsjj3QWPKzv9pj2gOlTblzLmM
|
||||
CcpL3TGQlsjMH/1WljTbjhzqLL6FLmPdqqmV0/0plRPwyJiT2S0WR5ARg6I6IqIoV6Lr/sCMKKCm
|
||||
fecqQjuCgGOlYx8ZzHyyZqjC0203b+J+BlHZRYQfEs4kUmSFC0iAToexIiIwquuuvuAC4EDosEKA
|
||||
A1GqtH6qRNdDYfOiaxaJSaSjpCuKAsR49GiKweR6NrFvG5Ybd0mN1MkGco/PU+PcF4UgStyYJ9OR
|
||||
JitHHmkHr96i5OTUawuzXnzUJIBHKWk7buis/UDr2O1xcSvy6Fgd60GXIsUf1DnQJ4+H4xj04KlG
|
||||
DfV0OoIu0G4skaMxXDtG6nsEEFZegB31pWXogvziB4xiRfUg3kZwhqG8k9MedKZssCz3AwyIDMvU
|
||||
clOGvGBG85hqwvG/Q/lwIHfKN0F5VVJjjVsSn8VoxIidrPIwq7ejMZdnrY8XD2zHc+0klGvIg5rQ
|
||||
mjdJBKuxFshsSUktq6HQjJLyQUp5ISXbY9e2nKd+Qmn7OmMCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
|
||||
AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNwuH9FhN3nkq9XVsxJxaD1qaJwiMB8GA1Ud
|
||||
IwQYMBaAFNwuH9FhN3nkq9XVsxJxaD1qaJwiMA0GCSqGSIb3DQEBCwUAA4ICAQCR8EICaEDuw2jA
|
||||
VC/f7GLDw56KoDEoqoOOpFaWEhCGVrqXctJUMHytGdUdaG/7FELYjQ7ztdGl4wJCXtzoRlgHNQIw
|
||||
4Lx0SsFDKv/bGtCwr2zD/cuz9X9tAy5ZVp0tLTWMstZDFyySCstd6IwPS3BD0IL/qMy/pJTAvoe9
|
||||
iuOTe8aPmxadJ2W8esVCgmxcB9CpwYhgROmYhRZf+I/KARDOJcP5YBugxZfD0yyIMaK9MOzQ0MAS
|
||||
8cE54+X1+NZK3TTN+2/BT+MAi1bikvcoskJ3ciNnxz8RFbLEAwW+uxF7Cr+obuf/WEPPm2eggAe2
|
||||
HcqtbepBEX4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS
|
||||
vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918
|
||||
oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF
|
||||
YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
|
||||
gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
ANF Secure Server Root CA
|
||||
=========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
|
|
@ -3566,3 +3598,99 @@ Y1w8ndYn81LsF7Kpryz3dvgwHQYDVR0OBBYEFJPhQ2NcPJ3WJ/NS7Beyqa8s93b4MA4GA1UdDwEB
|
|||
cFBTApFwhVmpHqTm6iMxoAACMQD94vizrxa5HnPEluPBMBnYfubDl94cT7iJLzPrSA8Z94dGXSaQ
|
||||
pYXFuXqUPoeovQA=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
TWCA CYBER Root CA
|
||||
==================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFjTCCA3WgAwIBAgIQQAE0jMIAAAAAAAAAATzyxjANBgkqhkiG9w0BAQwFADBQMQswCQYDVQQG
|
||||
EwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJUV0NB
|
||||
IENZQkVSIFJvb3QgQ0EwHhcNMjIxMTIyMDY1NDI5WhcNNDcxMTIyMTU1OTU5WjBQMQswCQYDVQQG
|
||||
EwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJUV0NB
|
||||
IENZQkVSIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDG+Moe2Qkgfh1s
|
||||
Ts6P40czRJzHyWmqOlt47nDSkvgEs1JSHWdyKKHfi12VCv7qze33Kc7wb3+szT3vsxxFavcokPFh
|
||||
V8UMxKNQXd7UtcsZyoC5dc4pztKFIuwCY8xEMCDa6pFbVuYdHNWdZsc/34bKS1PE2Y2yHer43CdT
|
||||
o0fhYcx9tbD47nORxc5zb87uEB8aBs/pJ2DFTxnk684iJkXXYJndzk834H/nY62wuFm40AZoNWDT
|
||||
Nq5xQwTxaWV4fPMf88oon1oglWa0zbfuj3ikRRjpJi+NmykosaS3Om251Bw4ckVYsV7r8Cibt4LK
|
||||
/c/WMw+f+5eesRycnupfXtuq3VTpMCEobY5583WSjCb+3MX2w7DfRFlDo7YDKPYIMKoNM+HvnKkH
|
||||
IuNZW0CP2oi3aQiotyMuRAlZN1vH4xfyIutuOVLF3lSnmMlLIJXcRolftBL5hSmO68gnFSDAS9TM
|
||||
fAxsNAwmmyYxpjyn9tnQS6Jk/zuZQXLB4HCX8SS7K8R0IrGsayIyJNN4KsDAoS/xUgXJP+92ZuJF
|
||||
2A09rZXIx4kmyA+upwMu+8Ff+iDhcK2wZSA3M2Cw1a/XDBzCkHDXShi8fgGwsOsVHkQGzaRP6AzR
|
||||
wyAQ4VRlnrZR0Bp2a0JaWHY06rc3Ga4udfmW5cFZ95RXKSWNOkyrTZpB0F8mAwIDAQABo2MwYTAO
|
||||
BgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSdhWEUfMFib5do5E83
|
||||
QOGt4A1WNzAdBgNVHQ4EFgQUnYVhFHzBYm+XaORPN0DhreANVjcwDQYJKoZIhvcNAQEMBQADggIB
|
||||
AGSPesRiDrWIzLjHhg6hShbNcAu3p4ULs3a2D6f/CIsLJc+o1IN1KriWiLb73y0ttGlTITVX1olN
|
||||
c79pj3CjYcya2x6a4CD4bLubIp1dhDGaLIrdaqHXKGnK/nZVekZn68xDiBaiA9a5F/gZbG0jAn/x
|
||||
X9AKKSM70aoK7akXJlQKTcKlTfjF/biBzysseKNnTKkHmvPfXvt89YnNdJdhEGoHK4Fa0o635yDR
|
||||
IG4kqIQnoVesqlVYL9zZyvpoBJ7tRCT5dEA7IzOrg1oYJkK2bVS1FmAwbLGg+LhBoF1JSdJlBTrq
|
||||
/p1hvIbZv97Tujqxf36SNI7JAG7cmL3c7IAFrQI932XtCwP39xaEBDG6k5TY8hL4iuO/Qq+n1M0R
|
||||
FxbIQh0UqEL20kCGoE8jypZFVmAGzbdVAaYBlGX+bgUJurSkquLvWL69J1bY73NxW0Qz8ppy6rBe
|
||||
Pm6pUlvscG21h483XjyMnM7k8M4MZ0HMzvaAq07MTFb1wWFZk7Q+ptq4NxKfKjLji7gh7MMrZQzv
|
||||
It6IKTtM1/r+t+FHvpw+PoP7UV31aPcuIYXcv/Fa4nzXxeSDwWrruoBa3lwtcHb4yOWHh8qgnaHl
|
||||
IhInD0Q9HWzq1MKLL295q39QpsQZp6F6t5b5wR9iWqJDB0BeJsas7a5wFsWqynKKTbDPAYsDP27X
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
SecureSign Root CA12
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDcjCCAlqgAwIBAgIUZvnHwa/swlG07VOX5uaCwysckBYwDQYJKoZIhvcNAQELBQAwUTELMAkG
|
||||
A1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28uLCBMdGQuMR0wGwYDVQQDExRT
|
||||
ZWN1cmVTaWduIFJvb3QgQ0ExMjAeFw0yMDA0MDgwNTM2NDZaFw00MDA0MDgwNTM2NDZaMFExCzAJ
|
||||
BgNVBAYTAkpQMSMwIQYDVQQKExpDeWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMU
|
||||
U2VjdXJlU2lnbiBSb290IENBMTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6OcE3
|
||||
emhFKxS06+QT61d1I02PJC0W6K6OyX2kVzsqdiUzg2zqMoqUm048luT9Ub+ZyZN+v/mtp7JIKwcc
|
||||
J/VMvHASd6SFVLX9kHrko+RRWAPNEHl57muTH2SOa2SroxPjcf59q5zdJ1M3s6oYwlkm7Fsf0uZl
|
||||
fO+TvdhYXAvA42VvPMfKWeP+bl+sg779XSVOKik71gurFzJ4pOE+lEa+Ym6b3kaosRbnhW70CEBF
|
||||
EaCeVESE99g2zvVQR9wsMJvuwPWW0v4JhscGWa5Pro4RmHvzC1KqYiaqId+OJTN5lxZJjfU+1Uef
|
||||
NzFJM3IFTQy2VYzxV4+Kh9GtxRESOaCtAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
|
||||
AQH/BAQDAgEGMB0GA1UdDgQWBBRXNPN0zwRL1SXm8UC2LEzZLemgrTANBgkqhkiG9w0BAQsFAAOC
|
||||
AQEAPrvbFxbS8hQBICw4g0utvsqFepq2m2um4fylOqyttCg6r9cBg0krY6LdmmQOmFxv3Y67ilQi
|
||||
LUoT865AQ9tPkbeGGuwAtEGBpE/6aouIs3YIcipJQMPTw4WJmBClnW8Zt7vPemVV2zfrPIpyMpce
|
||||
mik+rY3moxtt9XUa5rBouVui7mlHJzWhhpmA8zNL4WukJsPvdFlseqJkth5Ew1DgDzk9qTPxpfPS
|
||||
vWKErI4cqc1avTc7bgoitPQV55FYxTpE05Uo2cBl6XLK0A+9H7MV2anjpEcJnuDLN/v9vZfVvhga
|
||||
aaI5gdka9at/yOPiZwud9AzqVN/Ssq+xIvEg37xEHA==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
SecureSign Root CA14
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFcjCCA1qgAwIBAgIUZNtaDCBO6Ncpd8hQJ6JaJ90t8sswDQYJKoZIhvcNAQEMBQAwUTELMAkG
|
||||
A1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28uLCBMdGQuMR0wGwYDVQQDExRT
|
||||
ZWN1cmVTaWduIFJvb3QgQ0ExNDAeFw0yMDA0MDgwNzA2MTlaFw00NTA0MDgwNzA2MTlaMFExCzAJ
|
||||
BgNVBAYTAkpQMSMwIQYDVQQKExpDeWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMU
|
||||
U2VjdXJlU2lnbiBSb290IENBMTQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDF0nqh
|
||||
1oq/FjHQmNE6lPxauG4iwWL3pwon71D2LrGeaBLwbCRjOfHw3xDG3rdSINVSW0KZnvOgvlIfX8xn
|
||||
bacuUKLBl422+JX1sLrcneC+y9/3OPJH9aaakpUqYllQC6KxNedlsmGy6pJxaeQp8E+BgQQ8sqVb
|
||||
1MWoWWd7VRxJq3qdwudzTe/NCcLEVxLbAQ4jeQkHO6Lo/IrPj8BGJJw4J+CDnRugv3gVEOuGTgpa
|
||||
/d/aLIJ+7sr2KeH6caH3iGicnPCNvg9JkdjqOvn90Ghx2+m1K06Ckm9mH+Dw3EzsytHqunQG+bOE
|
||||
kJTRX45zGRBdAuVwpcAQ0BB8b8VYSbSwbprafZX1zNoCr7gsfXmPvkPx+SgojQlD+Ajda8iLLCSx
|
||||
jVIHvXiby8posqTdDEx5YMaZ0ZPxMBoH064iwurO8YQJzOAUbn8/ftKChazcqRZOhaBgy/ac18iz
|
||||
ju3Gm5h1DVXoX+WViwKkrkMpKBGk5hIwAUt1ax5mnXkvpXYvHUC0bcl9eQjs0Wq2XSqypWa9a4X0
|
||||
dFbD9ed1Uigspf9mR6XU/v6eVL9lfgHWMI+lNpyiUBzuOIABSMbHdPTGrMNASRZhdCyvjG817XsY
|
||||
AFs2PJxQDcqSMxDxJklt33UkN4Ii1+iW/RVLApY+B3KVfqs9TC7XyvDf4Fg/LS8EmjijAQIDAQAB
|
||||
o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUBpOjCl4oaTeq
|
||||
YR3r6/wtbyPk86AwDQYJKoZIhvcNAQEMBQADggIBAJaAcgkGfpzMkwQWu6A6jZJOtxEaCnFxEM0E
|
||||
rX+lRVAQZk5KQaID2RFPeje5S+LGjzJmdSX7684/AykmjbgWHfYfM25I5uj4V7Ibed87hwriZLoA
|
||||
ymzvftAj63iP/2SbNDefNWWipAA9EiOWWF3KY4fGoweITedpdopTzfFP7ELyk+OZpDc8h7hi2/Ds
|
||||
Hzc/N19DzFGdtfCXwreFamgLRB7lUe6TzktuhsHSDCRZNhqfLJGP4xjblJUK7ZGqDpncllPjYYPG
|
||||
FrojutzdfhrGe0K22VoF3Jpf1d+42kd92jjbrDnVHmtsKheMYc2xbXIBw8MgAGJoFjHVdqqGuw6q
|
||||
nsb58Nn4DSEC5MUoFlkRudlpcyqSeLiSV5sI8jrlL5WwWLdrIBRtFO8KvH7YVdiI2i/6GaX7i+B/
|
||||
OfVyK4XELKzvGUWSTLNhB9xNH27SgRNcmvMSZ4PPmz+Ln52kuaiWA3rF7iDeM9ovnhp6dB7h7sxa
|
||||
OgTdsxoEqBRjrLdHEoOabPXm6RUVkRqEGQ6UROcSjiVbgGcZ3GOTEAtlLor6CZpO2oYofaphNdgO
|
||||
pygau1LgePhsumywbrmHXumZNTfxPWQrqaA0k89jL9WB365jJ6UeTo3cKXhZ+PmhIIynJkBugnLN
|
||||
eLLIjzwec+fBH7/PzqUqm9tEZDKgu39cJRNItX+S
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
SecureSign Root CA15
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICIzCCAamgAwIBAgIUFhXHw9hJp75pDIqI7fBw+d23PocwCgYIKoZIzj0EAwMwUTELMAkGA1UE
|
||||
BhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28uLCBMdGQuMR0wGwYDVQQDExRTZWN1
|
||||
cmVTaWduIFJvb3QgQ0ExNTAeFw0yMDA0MDgwODMyNTZaFw00NTA0MDgwODMyNTZaMFExCzAJBgNV
|
||||
BAYTAkpQMSMwIQYDVQQKExpDeWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMUU2Vj
|
||||
dXJlU2lnbiBSb290IENBMTUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQLUHSNZDKZmbPSYAi4Io5G
|
||||
dCx4wCtELW1fHcmuS1Iggz24FG1Th2CeX2yF2wYUleDHKP+dX+Sq8bOLbe1PL0vJSpSRZHX+AezB
|
||||
2Ot6lHhWGENfa4HL9rzatAy2KZMIaY+jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
|
||||
AgEGMB0GA1UdDgQWBBTrQciu/NWeUUj1vYv0hyCTQSvT9DAKBggqhkjOPQQDAwNoADBlAjEA2S6J
|
||||
fl5OpBEHvVnCB96rMjhTKkZEBhd6zlHp4P9mLQlO4E/0BdGF9jVg3PVys0Z9AjBEmEYagoUeYWmJ
|
||||
SwdLZrWeqrqgHkHZAXQ6bkU6iYAZezKYVWOr62Nuk22rGwlgMU4=
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"description": "The Kirby core",
|
||||
"license": "proprietary",
|
||||
"type": "kirby-cms",
|
||||
"version": "4.4.0",
|
||||
"version": "4.5.0",
|
||||
"keywords": [
|
||||
"kirby",
|
||||
"cms",
|
||||
|
|
@ -38,15 +38,15 @@
|
|||
"ext-openssl": "*",
|
||||
"christian-riesen/base32": "1.6.0",
|
||||
"claviska/simpleimage": "4.2.0",
|
||||
"composer/semver": "3.4.2",
|
||||
"filp/whoops": "2.15.4",
|
||||
"composer/semver": "3.4.3",
|
||||
"filp/whoops": "2.16.0",
|
||||
"getkirby/composer-installer": "^1.2.1",
|
||||
"laminas/laminas-escaper": "2.13.0",
|
||||
"laminas/laminas-escaper": "2.14.0",
|
||||
"michelf/php-smartypants": "1.8.1",
|
||||
"phpmailer/phpmailer": "6.9.1",
|
||||
"symfony/polyfill-intl-idn": "1.30.0",
|
||||
"symfony/polyfill-mbstring": "1.30.0",
|
||||
"symfony/yaml": "6.4.11"
|
||||
"phpmailer/phpmailer": "6.9.2",
|
||||
"symfony/polyfill-intl-idn": "1.31.0",
|
||||
"symfony/polyfill-mbstring": "1.31.0",
|
||||
"symfony/yaml": "6.4.13"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*"
|
||||
|
|
|
|||
115
public/kirby/composer.lock
generated
115
public/kirby/composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a49870b845c1d596a44c5af23c4dd685",
|
||||
"content-hash": "f12b026f0a6ca67dc1bd0072f607d1eb",
|
||||
"packages": [
|
||||
{
|
||||
"name": "christian-riesen/base32",
|
||||
|
|
@ -120,24 +120,24 @@
|
|||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.4.2",
|
||||
"version": "3.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6"
|
||||
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6",
|
||||
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
|
||||
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
"phpstan/phpstan": "^1.11",
|
||||
"symfony/phpunit-bridge": "^3 || ^7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
"support": {
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.4.2"
|
||||
"source": "https://github.com/composer/semver/tree/3.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -197,30 +197,30 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-12T11:35:52+00:00"
|
||||
"time": "2024-09-19T14:15:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "filp/whoops",
|
||||
"version": "2.15.4",
|
||||
"version": "2.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/filp/whoops.git",
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546"
|
||||
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546",
|
||||
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9 || ^7.0 || ^8.0",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
|
||||
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
|
||||
"mockery/mockery": "^1.0",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
|
||||
"symfony/var-dumper": "^4.0 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/filp/whoops/issues",
|
||||
"source": "https://github.com/filp/whoops/tree/2.15.4"
|
||||
"source": "https://github.com/filp/whoops/tree/2.16.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-03T12:00:00+00:00"
|
||||
"time": "2024-09-25T12:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "getkirby/composer-installer",
|
||||
|
|
@ -319,33 +319,33 @@
|
|||
},
|
||||
{
|
||||
"name": "laminas/laminas-escaper",
|
||||
"version": "2.13.0",
|
||||
"version": "2.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laminas/laminas-escaper.git",
|
||||
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba"
|
||||
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba",
|
||||
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/0f7cb975f4443cf22f33408925c231225cfba8cb",
|
||||
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-mbstring": "*",
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
|
||||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
|
||||
},
|
||||
"conflict": {
|
||||
"zendframework/zend-escaper": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"infection/infection": "^0.27.0",
|
||||
"laminas/laminas-coding-standard": "~2.5.0",
|
||||
"infection/infection": "^0.27.9",
|
||||
"laminas/laminas-coding-standard": "~3.0.0",
|
||||
"maglnet/composer-require-checker": "^3.8.0",
|
||||
"phpunit/phpunit": "^9.6.7",
|
||||
"psalm/plugin-phpunit": "^0.18.4",
|
||||
"vimeo/psalm": "^5.9"
|
||||
"phpunit/phpunit": "^9.6.16",
|
||||
"psalm/plugin-phpunit": "^0.19.0",
|
||||
"vimeo/psalm": "^5.21.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
|
|
@ -377,7 +377,7 @@
|
|||
"type": "community_bridge"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-10T08:35:13+00:00"
|
||||
"time": "2024-10-24T10:12:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/color-extractor",
|
||||
|
|
@ -496,16 +496,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.9.1",
|
||||
"version": "v6.9.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18"
|
||||
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18",
|
||||
"reference": "039de174cd9c17a8389754d3b877a2ed22743e18",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a7b17b42fa4887c92146243f3d2f4ccb962af17c",
|
||||
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -565,7 +565,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.9.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -573,7 +573,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-25T22:23:28+00:00"
|
||||
"time": "2024-10-09T10:07:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
|
|
@ -773,22 +773,21 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.30.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c"
|
||||
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
|
||||
"reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||
"reference": "c36586dcf89a12315939e00ec9b4474adcb1d773",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||
"symfony/polyfill-php72": "^1.10"
|
||||
"php": ">=7.2",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
|
|
@ -837,7 +836,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -853,7 +852,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-05-31T15:07:36+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
|
|
@ -938,20 +937,20 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.30.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c"
|
||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c",
|
||||
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
|
|
@ -998,7 +997,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1014,20 +1013,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-06-19T12:30:46+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v6.4.11",
|
||||
"version": "v6.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "be37e7f13195e05ab84ca5269365591edd240335"
|
||||
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/be37e7f13195e05ab84ca5269365591edd240335",
|
||||
"reference": "be37e7f13195e05ab84ca5269365591edd240335",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
|
||||
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1070,7 +1069,7 @@
|
|||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/yaml/tree/v6.4.11"
|
||||
"source": "https://github.com/symfony/yaml/tree/v6.4.13"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1086,7 +1085,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-08-12T09:55:28+00:00"
|
||||
"time": "2024-09-25T14:18:03+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
|
|
|||
|
|
@ -31,6 +31,18 @@ return [
|
|||
];
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'system/method-test',
|
||||
'method' => 'PATCH',
|
||||
'action' => function () {
|
||||
return [
|
||||
'status' => match ($this->kirby()->request()->method()) {
|
||||
'PATCH' => 'ok',
|
||||
default => 'fail'
|
||||
}
|
||||
];
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'system/register',
|
||||
'method' => 'POST',
|
||||
|
|
|
|||
|
|
@ -203,7 +203,9 @@ return [
|
|||
'users/(:any)/roles',
|
||||
],
|
||||
'action' => function (string $id) {
|
||||
return $this->user($id)->roles();
|
||||
$kirby = $this->kirby();
|
||||
$purpose = $kirby->request()->get('purpose');
|
||||
return $this->user($id)->roles($purpose);
|
||||
}
|
||||
],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ return [
|
|||
},
|
||||
'submit' => function (string $languageCode, string $translationKey) {
|
||||
Find::language($languageCode)->variable($translationKey, true)->update(
|
||||
App::instance()->request()->get('value')
|
||||
App::instance()->request()->get('value', '')
|
||||
);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
use Kirby\Cms\App;
|
||||
use Kirby\Cms\Find;
|
||||
use Kirby\Cms\PageRules;
|
||||
use Kirby\Cms\Url;
|
||||
use Kirby\Exception\Exception;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
use Kirby\Exception\PermissionException;
|
||||
|
|
@ -431,7 +432,7 @@ return [
|
|||
];
|
||||
}
|
||||
|
||||
$slugAppendix = Str::slug(I18n::translate('page.duplicate.appendix'));
|
||||
$slugAppendix = Url::slug(I18n::translate('page.duplicate.appendix'));
|
||||
$titleAppendix = I18n::translate('page.duplicate.appendix');
|
||||
|
||||
// if the item to be duplicated already exists
|
||||
|
|
|
|||
|
|
@ -70,12 +70,19 @@ return [
|
|||
'action' => function () {
|
||||
$kirby = App::instance();
|
||||
$request = $kirby->request();
|
||||
$root = $request->get('root');
|
||||
$page = $kirby->page($request->get('page'));
|
||||
$parents = $page?->parents()->flip()->values(
|
||||
fn ($parent) => $parent->uuid()?->toString() ?? $parent->id()
|
||||
) ?? [];
|
||||
|
||||
// if root is included, add the site as top-level parent
|
||||
if ($root === 'true') {
|
||||
array_unshift($parents, $kirby->site()->uuid()?->toString() ?? '/');
|
||||
}
|
||||
|
||||
return [
|
||||
'data' => $page->parents()->flip()->values(
|
||||
fn ($parent) => $parent->uuid()?->toString() ?? $parent->id()
|
||||
)
|
||||
'data' => $parents
|
||||
];
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -20,12 +20,19 @@ return [
|
|||
'pattern' => 'users/create',
|
||||
'load' => function () {
|
||||
$kirby = App::instance();
|
||||
$roles = $kirby->roles()->canBeCreated();
|
||||
|
||||
// get default value for role
|
||||
if ($role = $kirby->request()->get('role')) {
|
||||
$role = $kirby->roles()->find($role)?->id();
|
||||
$role = $roles->find($role)?->id();
|
||||
}
|
||||
|
||||
// get role field definition, incl. available role options
|
||||
$roles = Field::role(
|
||||
roles: $roles,
|
||||
props: ['required' => true]
|
||||
);
|
||||
|
||||
return [
|
||||
'component' => 'k-form-dialog',
|
||||
'props' => [
|
||||
|
|
@ -39,9 +46,7 @@ return [
|
|||
'translation' => Field::translation([
|
||||
'required' => true
|
||||
]),
|
||||
'role' => Field::role([
|
||||
'required' => true
|
||||
])
|
||||
'role' => $roles
|
||||
],
|
||||
'submitButton' => I18n::translate('create'),
|
||||
'value' => [
|
||||
|
|
@ -49,7 +54,7 @@ return [
|
|||
'email' => '',
|
||||
'password' => '',
|
||||
'translation' => $kirby->panelLanguage(),
|
||||
'role' => $role ?? $kirby->user()->role()->name()
|
||||
'role' => $role ?? $roles['options'][0]['value'] ?? null
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
@ -228,10 +233,13 @@ return [
|
|||
'component' => 'k-form-dialog',
|
||||
'props' => [
|
||||
'fields' => [
|
||||
'role' => Field::role([
|
||||
'label' => I18n::translate('user.changeRole.select'),
|
||||
'required' => true,
|
||||
])
|
||||
'role' => Field::role(
|
||||
roles: $user->roles(),
|
||||
props: [
|
||||
'label' => I18n::translate('user.changeRole.select'),
|
||||
'required' => true,
|
||||
]
|
||||
)
|
||||
],
|
||||
'submitButton' => I18n::translate('user.changeRole'),
|
||||
'value' => [
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ return [
|
|||
return [
|
||||
'component' => 'k-users-view',
|
||||
'props' => [
|
||||
'role' => function () use ($kirby, $roles, $role) {
|
||||
'canCreate' => $kirby->roles()->canBeCreated()->count() > 0,
|
||||
'role' => function () use ($roles, $role) {
|
||||
if ($role) {
|
||||
return $roles[$role] ?? null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ if (
|
|||
) {
|
||||
$url = $video->url();
|
||||
$attrs = array_filter([
|
||||
'autoplay' => $block->autoplay()->toBool(),
|
||||
'controls' => $block->controls()->toBool(),
|
||||
'loop' => $block->loop()->toBool(),
|
||||
'muted' => $block->muted()->toBool(),
|
||||
'poster' => $block->poster()->toFile()?->url(),
|
||||
'preload' => $block->preload()->value(),
|
||||
'autoplay' => $block->autoplay()->toBool(),
|
||||
'controls' => $block->controls()->toBool(),
|
||||
'loop' => $block->loop()->toBool(),
|
||||
'muted' => $block->muted()->toBool() || $block->autoplay()->toBool(),
|
||||
'playsinline' => $block->autoplay()->toBool(),
|
||||
'poster' => $block->poster()->toFile()?->url(),
|
||||
'preload' => $block->preload()->value(),
|
||||
]);
|
||||
} else {
|
||||
$url = $block->url();
|
||||
|
|
|
|||
|
|
@ -126,12 +126,12 @@
|
|||
"error.form.notSaved": "Formulář nemohl být uložen",
|
||||
|
||||
"error.language.code": "Zadejte prosím platný kód jazyka",
|
||||
"error.language.create.permission": "You are not allowed to create a language",
|
||||
"error.language.delete.permission": "You are not allowed to delete the language",
|
||||
"error.language.create.permission": "Nemáte dovoleno vytvořit jazyk",
|
||||
"error.language.delete.permission": "Nemáte dovoleno jazyk vymazat",
|
||||
"error.language.duplicate": "Jazyk již existuje",
|
||||
"error.language.name": "Zadejte prosím platné jméno jazyka",
|
||||
"error.language.notFound": "Jazyk nebyl nalezen",
|
||||
"error.language.update.permission": "You are not allowed to update the language",
|
||||
"error.language.update.permission": "Nemáte dovoleno aktualizovat jazyk",
|
||||
|
||||
"error.layout.validation.block": "V rozvržení {layoutIndex} je v poli \"{field}\" v bloku {blockIndex} při použití \"{fieldset}\" typu chyba",
|
||||
"error.layout.validation.settings": "Chyba v nastavení rozvržení {index}",
|
||||
|
|
@ -620,8 +620,8 @@
|
|||
"stats.empty": "Žádná hlášení",
|
||||
"status": "Stav",
|
||||
|
||||
"system.info.copy": "Copy info",
|
||||
"system.info.copied": "System info copied",
|
||||
"system.info.copy": "Kopírovat informace",
|
||||
"system.info.copied": "Systémové informace zkopírovány",
|
||||
"system.issues.content": "Složka content je zřejmě přístupná zvenčí",
|
||||
"system.issues.eol.kirby": "Instalovaná verze Kirby dosáhla konce životnosti a nebude již dále dostávat bezpečnostní aktualizace",
|
||||
"system.issues.eol.plugin": "Instalovaná verze doplňku { plugin } dosáhla konce životnosti a nebude již dále dostávat bezpečnostní aktualizace",
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@
|
|||
"error.page.move.ancestor": "The page cannot be moved into itself",
|
||||
"error.page.move.directory": "The page directory cannot be moved",
|
||||
"error.page.move.duplicate": "A sub page with the URL appendix \"{slug}\" already exists",
|
||||
"error.page.move.noSections": "The page \"{parent}\" cannot be a parent of any page because it lacks any pages sections in its blueprint",
|
||||
"error.page.move.notFound": "The moved page could not be found",
|
||||
"error.page.move.permission": "You are not allowed to move \"{slug}\"",
|
||||
"error.page.move.template": "The \"{template}\" template is not accepted as a subpage of \"{parent}\"",
|
||||
|
|
@ -629,6 +630,7 @@
|
|||
|
||||
"system.info.copy": "Copy info",
|
||||
"system.info.copied": "System info copied",
|
||||
"system.issues.api.methods": "Your server does not support PATCH requests",
|
||||
"system.issues.content": "The content folder seems to be exposed",
|
||||
"system.issues.eol.kirby": "Your installed Kirby version has reached end-of-life and will not receive further security updates",
|
||||
"system.issues.eol.plugin": "Your installed version of the { plugin } plugin is has reached end-of-life and will not receive further security updates",
|
||||
|
|
|
|||
|
|
@ -126,12 +126,12 @@
|
|||
"error.form.notSaved": "항목을 저장할 수 없습니다.",
|
||||
|
||||
"error.language.code": "올바른 언어 코드를 입력하세요.",
|
||||
"error.language.create.permission": "You are not allowed to create a language",
|
||||
"error.language.delete.permission": "You are not allowed to delete the language",
|
||||
"error.language.create.permission": "언어를 등록할 권한이 없습니다.",
|
||||
"error.language.delete.permission": "언어를 삭제할 권한이 없습니다.",
|
||||
"error.language.duplicate": "이미 등록한 언어입니다.",
|
||||
"error.language.name": "올바른 언어명을 입력하세요.",
|
||||
"error.language.notFound": "언어를 찾을 수 없습니다.",
|
||||
"error.language.update.permission": "You are not allowed to update the language",
|
||||
"error.language.update.permission": "언어를 변경할 권한이 없습니다.",
|
||||
|
||||
"error.layout.validation.block": "레이아웃({layoutIndex})의 특정 블록 유형({fieldset})을 사용하는 블록({blockIndex})의 특정 필드({field})에 오류가 있습니다.",
|
||||
"error.layout.validation.settings": "레이아웃({index}) 옵션을 확인하세요.",
|
||||
|
|
@ -620,8 +620,8 @@
|
|||
"stats.empty": "관련 기록이 없습니다.",
|
||||
"status": "상태",
|
||||
|
||||
"system.info.copy": "Copy info",
|
||||
"system.info.copied": "System info copied",
|
||||
"system.info.copy": "정보 복사",
|
||||
"system.info.copied": "시스템 정보가 복사되었습니다.",
|
||||
"system.issues.content": "<code>/content</code> 폴더의 권한을 확인하세요.",
|
||||
"system.issues.eol.kirby": "설치된 Kirby 버전이 만료되었습니다. 더 이상 보안 업데이트를 받을 수 없습니다.",
|
||||
"system.issues.eol.plugin": "설치된 플러그인({plugin}의 지원이 종료되었습니다. 더 이상 보안 업데이트를 받을 수 없습니다.",
|
||||
|
|
|
|||
|
|
@ -126,12 +126,12 @@
|
|||
"error.form.notSaved": "Het formulier kon niet worden opgeslagen",
|
||||
|
||||
"error.language.code": "Vul een geldige code voor deze taal in",
|
||||
"error.language.create.permission": "You are not allowed to create a language",
|
||||
"error.language.delete.permission": "You are not allowed to delete the language",
|
||||
"error.language.create.permission": "Je hebt geen rechten om een taal toe te voegen",
|
||||
"error.language.delete.permission": "Je hebt geen rechten om een taal te verwijderen",
|
||||
"error.language.duplicate": "De taal bestaat al",
|
||||
"error.language.name": "Vul een geldige naam voor deze taal in",
|
||||
"error.language.notFound": "De taal kan niet worden gevonden",
|
||||
"error.language.update.permission": "You are not allowed to update the language",
|
||||
"error.language.update.permission": "Je hebt geen rechten om deze taal te updaten",
|
||||
|
||||
"error.layout.validation.block": "Er is een fout opgetreden bij het \"{field}\" veld in blok {blockIndex} in het \"{fieldset}\" bloktype in layout {layoutIndex}",
|
||||
"error.layout.validation.settings": "Er is een fout gevonden in de instellingen van ontwerp {index} ",
|
||||
|
|
|
|||
|
|
@ -104,16 +104,16 @@
|
|||
"error.file.extension.forbidden": "A extensão \"{extension}\" não é permitida",
|
||||
"error.file.extension.invalid": "Extensão inválida: {extension}",
|
||||
"error.file.extension.missing": "As extensões de \"{filename}\" estão em falta",
|
||||
"error.file.maxheight": "A altura da imagem não deve exceder {height} pixels",
|
||||
"error.file.maxheight": "A altura da imagem não deve exceder {height} píxeis",
|
||||
"error.file.maxsize": "O ficheiro é demasiado grande",
|
||||
"error.file.maxwidth": "A largura da imagem não deve exceder {width} pixels",
|
||||
"error.file.maxwidth": "A largura da imagem não deve exceder {width} píxeis",
|
||||
"error.file.mime.differs": "O ficheiro enviado precisa de ser do tipo \"{mime}\"",
|
||||
"error.file.mime.forbidden": "O tipo de mídia \"{mime}\" não é permitido",
|
||||
"error.file.mime.invalid": "Tipo de mídia inválido: {mime}",
|
||||
"error.file.mime.missing": "Não foi possível detectar o tipo de mídia de \"{filename}\"",
|
||||
"error.file.minheight": "A altura da imagem deve ter pelo menos {height} pixels",
|
||||
"error.file.minheight": "A altura da imagem deve ter pelo menos {height} píxeis",
|
||||
"error.file.minsize": "O ficheiro é demasiado pequeno",
|
||||
"error.file.minwidth": "A largura da imagem deve ter pelo menos {width} pixels",
|
||||
"error.file.minwidth": "A largura da imagem deve ter pelo menos {width} píxeis",
|
||||
"error.file.name.unique": "O nome do ficheiro deve ser único",
|
||||
"error.file.name.missing": "O nome do ficheiro não pode ficar em branco",
|
||||
"error.file.notFound": "Não foi possível encontrar o ficheiro \"{filename}\"",
|
||||
|
|
@ -490,7 +490,7 @@
|
|||
"login.totp.disable.option": "Desativar códigos de segurança",
|
||||
"login.totp.disable.label": "Insira a sua palavra-passe para desativar códigos de segurança",
|
||||
"login.totp.disable.help": "No futuro, um segundo fator diferente, como um código de início de sessão enviado por e-mail, será solicitado quando iniciar a sessão. Poderá configurar códigos de segurança novamente mais tarde.",
|
||||
"login.totp.disable.admin": "<p>Isto irá desactivar os códigos de segurança para <strong>{user}</strong>.</p> <p>No futuro, um segundo fator diferente, como um código de início de sessão enviado por e-mail, será solicitado quando eles iniciarem a sessão. {user} poderá configurar códigos de segurança novamente após o próximo início de sessão.</p>",
|
||||
"login.totp.disable.admin": "<p>Isto irá desativar os códigos de segurança para <strong>{user}</strong>.</p> <p>No futuro, um segundo fator diferente, como um código de início de sessão enviado por e-mail, será solicitado quando eles iniciarem a sessão. {user} poderá configurar códigos de segurança novamente após o próximo início de sessão.</p>",
|
||||
"login.totp.disable.success": "Códigos de segurança desativados",
|
||||
|
||||
"logout": "Sair",
|
||||
|
|
@ -573,7 +573,7 @@
|
|||
"paste": "Colar",
|
||||
"paste.after": "Colar após",
|
||||
"paste.success": "{count} colados!",
|
||||
"pixel": "Pixel",
|
||||
"pixel": "Píxel",
|
||||
"plugin": "Plugin",
|
||||
"plugins": "Plugins",
|
||||
"prev": "Anterior",
|
||||
|
|
|
|||
|
|
@ -126,12 +126,12 @@
|
|||
"error.form.notSaved": "Formuläret kunde inte sparas",
|
||||
|
||||
"error.language.code": "Ange en giltig kod för språket",
|
||||
"error.language.create.permission": "You are not allowed to create a language",
|
||||
"error.language.delete.permission": "You are not allowed to delete the language",
|
||||
"error.language.create.permission": "Du saknar behörighet att skapa ett nytt språk",
|
||||
"error.language.delete.permission": "Du saknar behörighet att radera språket",
|
||||
"error.language.duplicate": "Språket finns redan",
|
||||
"error.language.name": "Ange ett giltigt namn för språket",
|
||||
"error.language.notFound": "Språket hittades inte",
|
||||
"error.language.update.permission": "You are not allowed to update the language",
|
||||
"error.language.update.permission": "Du saknar behörighet att redigera språket",
|
||||
|
||||
"error.layout.validation.block": "Det finns ett fel i fältet \"{field}\" i blocket {blockIndex} med blocktypen \"{fieldset}\" i layouten {layoutIndex}",
|
||||
"error.layout.validation.settings": "Det finns ett fel i inställningarna för layout {index}",
|
||||
|
|
@ -620,8 +620,8 @@
|
|||
"stats.empty": "Inga rapporter",
|
||||
"status": "Status",
|
||||
|
||||
"system.info.copy": "Copy info",
|
||||
"system.info.copied": "System info copied",
|
||||
"system.info.copy": "Kopiera info",
|
||||
"system.info.copied": "Systeminformation kopierad",
|
||||
"system.issues.content": "Mappen content verkar vara exponerad",
|
||||
"system.issues.eol.kirby": "Din installerade Kirby-version har nått slutet av sin livscykel och kommer inte att få fler säkerhetsuppdateringar",
|
||||
"system.issues.eol.plugin": "Den installerade versionen av tillägget { plugin } har nått slutet på sin livscykel och kommer inte att få fler säkerhetsuppdateringar.",
|
||||
|
|
|
|||
|
|
@ -338,13 +338,12 @@ class File extends ModelWithContent
|
|||
return false;
|
||||
}
|
||||
|
||||
static $accessible = [];
|
||||
static $accessible = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->template() ?? '__none__';
|
||||
$accessible[$role] ??= [];
|
||||
|
||||
if ($template = $this->template()) {
|
||||
return $accessible[$template] ??= $this->permissions()->can('access');
|
||||
}
|
||||
|
||||
return $accessible['__none__'] ??= $this->permissions()->can('access');
|
||||
return $accessible[$role][$template] ??= $this->permissions()->can('access');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -363,13 +362,12 @@ class File extends ModelWithContent
|
|||
return false;
|
||||
}
|
||||
|
||||
static $listable = [];
|
||||
static $listable = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->template() ?? '__none__';
|
||||
$listable[$role] ??= [];
|
||||
|
||||
if ($template = $this->template()) {
|
||||
return $listable[$template] ??= $this->permissions()->can('list');
|
||||
}
|
||||
|
||||
return $listable['__none__'] ??= $this->permissions()->can('list');
|
||||
return $listable[$role][$template] ??= $this->permissions()->can('list');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -379,13 +377,12 @@ class File extends ModelWithContent
|
|||
*/
|
||||
public function isReadable(): bool
|
||||
{
|
||||
static $readable = [];
|
||||
static $readable = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->template() ?? '__none__';
|
||||
$readable[$role] ??= [];
|
||||
|
||||
if ($template = $this->template()) {
|
||||
return $readable[$template] ??= $this->permissions()->can('read');
|
||||
}
|
||||
|
||||
return $readable['__none__'] ??= $this->permissions()->can('read');
|
||||
return $readable[$role][$template] ??= $this->permissions()->can('read');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -633,12 +630,6 @@ class File extends ModelWithContent
|
|||
case 'page':
|
||||
$preview = $parent->blueprint()->preview();
|
||||
|
||||
// user has no permission to preview page,
|
||||
// also return null for file preview
|
||||
if ($preview === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// the page has a custom preview setting,
|
||||
// thus the file is only accessible through
|
||||
// the direct media URL
|
||||
|
|
|
|||
|
|
@ -139,10 +139,9 @@ trait FileActions
|
|||
|
||||
$file = $file->update(['template' => $template]);
|
||||
|
||||
// rename and/or resize the file if configured by new blueprint
|
||||
// resize the file if configured by new blueprint
|
||||
$create = $file->blueprint()->create();
|
||||
$file = $file->manipulate($create);
|
||||
$file = $file->changeExtension($file, $create['format'] ?? null);
|
||||
$file = $file->manipulate($create);
|
||||
|
||||
return $file;
|
||||
});
|
||||
|
|
@ -185,6 +184,7 @@ trait FileActions
|
|||
|
||||
/**
|
||||
* Copy the file to the given page
|
||||
* @internal
|
||||
*/
|
||||
public function copy(Page $page): static
|
||||
{
|
||||
|
|
@ -285,7 +285,6 @@ trait FileActions
|
|||
|
||||
// resize the file on upload if configured
|
||||
$file = $file->manipulate($create);
|
||||
$file = $file->changeExtension($file, $create['format'] ?? null);
|
||||
|
||||
// store the content if necessary
|
||||
// (always create files in the default language)
|
||||
|
|
@ -338,7 +337,14 @@ trait FileActions
|
|||
// generate image file and overwrite it in place
|
||||
$this->kirby()->thumb($this->root(), $this->root(), $options);
|
||||
|
||||
return $this->clone([]);
|
||||
$file = $this->clone();
|
||||
|
||||
// change the file extension if format option configured
|
||||
if ($format = $options['format'] ?? null) {
|
||||
$file = $file->changeExtension($file, $format);
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -387,7 +393,6 @@ trait FileActions
|
|||
// apply the resizing/crop options from the blueprint
|
||||
$create = $file->blueprint()->create();
|
||||
$file = $file->manipulate($create);
|
||||
$file = $file->changeExtension($file, $create['format'] ?? null);
|
||||
|
||||
// return a fresh clone
|
||||
return $file->clone();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
namespace Kirby\Cms;
|
||||
|
||||
use Kirby\Filesystem\F;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
class LanguageRoutes
|
||||
{
|
||||
|
|
@ -30,26 +29,9 @@ class LanguageRoutes
|
|||
'pattern' => $language->pattern(),
|
||||
'method' => 'ALL',
|
||||
'env' => 'site',
|
||||
'action' => function ($path = null) use ($kirby, $language) {
|
||||
'action' => function ($path = null) use ($language) {
|
||||
$result = $language->router()->call($path);
|
||||
|
||||
// redirect secondary-language pages that have
|
||||
// been accessed with non-translated slugs in their path
|
||||
// to their fully translated URL
|
||||
if ($path !== null && $result instanceof Page) {
|
||||
if (Str::endsWith($result->url(), $path) === false) {
|
||||
$url = $result->url();
|
||||
$query = $kirby->request()->query()->toString();
|
||||
|
||||
// preserve query across redirect
|
||||
if (empty($query) === false) {
|
||||
$url .= '?' . $query;
|
||||
}
|
||||
|
||||
return $kirby->response()->redirect($url);
|
||||
}
|
||||
}
|
||||
|
||||
// explicitly test for null as $result can
|
||||
// contain falsy values that should still be returned
|
||||
if ($result !== null) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class LanguageVariable
|
|||
throw new DuplicateException('The variable is part of the core translation and cannot be overwritten');
|
||||
}
|
||||
|
||||
$translations[$key] = trim($value ?? '');
|
||||
$translations[$key] = $value ?? '';
|
||||
|
||||
$language->update(['translations' => $translations]);
|
||||
|
||||
|
|
@ -102,10 +102,10 @@ class LanguageVariable
|
|||
/**
|
||||
* Sets a new value for the language variable
|
||||
*/
|
||||
public function update(string $value): static
|
||||
public function update(string|null $value = null): static
|
||||
{
|
||||
$translations = $this->language->translations();
|
||||
$translations[$this->key] = $value;
|
||||
$translations = $this->language->translations();
|
||||
$translations[$this->key] = $value ?? '';
|
||||
|
||||
$language = $this->language->update(['translations' => $translations]);
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ class License
|
|||
protected string|null $date = null,
|
||||
protected string|null $signature = null,
|
||||
) {
|
||||
// normalize the email address
|
||||
$this->email = $this->email === null ? null : $this->normalizeEmail($this->email);
|
||||
// normalize arguments
|
||||
$this->code = $this->code !== null ? trim($this->code) : null;
|
||||
$this->email = $this->email !== null ? $this->normalizeEmail($this->email) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -523,11 +523,12 @@ class Page extends ModelWithContent
|
|||
return false;
|
||||
}
|
||||
|
||||
static $accessible = [];
|
||||
static $accessible = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->intendedTemplate()->name();
|
||||
$accessible[$role] ??= [];
|
||||
|
||||
$template = $this->intendedTemplate()->name();
|
||||
|
||||
return $accessible[$template] ??= $this->permissions()->can('access');
|
||||
return $accessible[$role][$template] ??= $this->permissions()->can('access');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -689,11 +690,12 @@ class Page extends ModelWithContent
|
|||
return false;
|
||||
}
|
||||
|
||||
static $listable = [];
|
||||
static $listable = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->intendedTemplate()->name();
|
||||
$listable[$role] ??= [];
|
||||
|
||||
$template = $this->intendedTemplate()->name();
|
||||
|
||||
return $listable[$template] ??= $this->permissions()->can('list');
|
||||
return $listable[$role][$template] ??= $this->permissions()->can('list');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -745,11 +747,12 @@ class Page extends ModelWithContent
|
|||
*/
|
||||
public function isReadable(): bool
|
||||
{
|
||||
static $readable = [];
|
||||
static $readable = [];
|
||||
$role = $this->kirby()->user()?->role()->id() ?? '__none__';
|
||||
$template = $this->intendedTemplate()->name();
|
||||
$readable[$role] ??= [];
|
||||
|
||||
$template = $this->intendedTemplate()->name();
|
||||
|
||||
return $readable[$template] ??= $this->permissions()->can('read');
|
||||
return $readable[$role][$template] ??= $this->permissions()->can('read');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ trait PageActions
|
|||
string|null $languageCode = null
|
||||
): static {
|
||||
// always sanitize the slug
|
||||
$slug = Str::slug($slug);
|
||||
$slug = Url::slug($slug);
|
||||
|
||||
// in multi-language installations the slug for the non-default
|
||||
// languages is stored in the text file. The changeSlugForLanguage
|
||||
|
|
@ -431,6 +431,8 @@ trait PageActions
|
|||
* Copies the page to a new parent
|
||||
*
|
||||
* @throws \Kirby\Exception\DuplicateException If the page already exists
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function copy(array $options = []): static
|
||||
{
|
||||
|
|
@ -443,7 +445,7 @@ trait PageActions
|
|||
$files = $options['files'] ?? false;
|
||||
|
||||
// clean up the slug
|
||||
$slug = Str::slug($slug);
|
||||
$slug = Url::slug($slug);
|
||||
|
||||
if ($parentModel->findPageOrDraft($slug)) {
|
||||
throw new DuplicateException([
|
||||
|
|
@ -495,7 +497,7 @@ trait PageActions
|
|||
public static function create(array $props): Page
|
||||
{
|
||||
// clean up the slug
|
||||
$props['slug'] = Str::slug($props['slug'] ?? $props['content']['title'] ?? null);
|
||||
$props['slug'] = Url::slug($props['slug'] ?? $props['content']['title'] ?? null);
|
||||
$props['template'] = $props['model'] = strtolower($props['template'] ?? 'default');
|
||||
$props['isDraft'] ??= $props['draft'] ?? true;
|
||||
|
||||
|
|
@ -685,7 +687,7 @@ trait PageActions
|
|||
public function duplicate(string|null $slug = null, array $options = []): static
|
||||
{
|
||||
// create the slug for the duplicate
|
||||
$slug = Str::slug($slug ?? $this->slug() . '-' . Str::slug(I18n::translate('page.duplicate.appendix')));
|
||||
$slug = Url::slug($slug ?? $this->slug() . '-' . Url::slug(I18n::translate('page.duplicate.appendix')));
|
||||
|
||||
$arguments = [
|
||||
'originalPage' => $this,
|
||||
|
|
@ -762,6 +764,7 @@ trait PageActions
|
|||
/**
|
||||
* @return $this|static
|
||||
* @throws \Kirby\Exception\LogicException If the folder cannot be moved
|
||||
* @internal
|
||||
*/
|
||||
public function publish(): static
|
||||
{
|
||||
|
|
@ -913,6 +916,7 @@ trait PageActions
|
|||
/**
|
||||
* Convert a page from listed or
|
||||
* unlisted to draft.
|
||||
* @internal
|
||||
*
|
||||
* @return $this|static
|
||||
* @throws \Kirby\Exception\LogicException If the folder cannot be moved
|
||||
|
|
|
|||
|
|
@ -365,27 +365,40 @@ class PageRules
|
|||
$allowed = [];
|
||||
|
||||
// collect all allowed subpage templates
|
||||
foreach ($parent->blueprint()->sections() as $section) {
|
||||
// only take pages sections into consideration
|
||||
if ($section->type() !== 'pages') {
|
||||
continue;
|
||||
}
|
||||
// from all pages sections in the blueprint
|
||||
// (only consider page sections that list pages
|
||||
// of the targeted new parent page)
|
||||
$sections = array_filter(
|
||||
$parent->blueprint()->sections(),
|
||||
fn ($section) =>
|
||||
$section->type() === 'pages' &&
|
||||
$section->parent()->is($parent)
|
||||
);
|
||||
|
||||
// only consider page sections that list pages
|
||||
// of the targeted new parent page
|
||||
if ($section->parent() !== $parent) {
|
||||
continue;
|
||||
}
|
||||
// check if the parent has at least one pages section
|
||||
if ($sections === []) {
|
||||
throw new LogicException([
|
||||
'key' => 'page.move.noSections',
|
||||
'data' => [
|
||||
'parent' => $parent->id() ?? '/',
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
// go through all allowed blueprints and
|
||||
// add the name to the allow list
|
||||
foreach ($section->blueprints() as $blueprint) {
|
||||
$allowed[] = $blueprint['name'];
|
||||
// go through all allowed templates and
|
||||
// add the name to the allowlist
|
||||
foreach ($sections as $section) {
|
||||
foreach ($section->templates() as $template) {
|
||||
$allowed[] = $template;
|
||||
}
|
||||
}
|
||||
|
||||
// check if the template of this page is allowed as subpage type
|
||||
if (in_array($page->intendedTemplate()->name(), $allowed) === false) {
|
||||
// for the potential new parent
|
||||
if (
|
||||
$allowed !== [] &&
|
||||
in_array($page->intendedTemplate()->name(), $allowed) === false
|
||||
) {
|
||||
throw new PermissionException([
|
||||
'key' => 'page.move.template',
|
||||
'data' => [
|
||||
|
|
|
|||
|
|
@ -25,15 +25,19 @@ class Roles extends Collection
|
|||
|
||||
/**
|
||||
* Returns a filtered list of all
|
||||
* roles that can be created by the
|
||||
* roles that can be changed by the
|
||||
* current user
|
||||
*
|
||||
* Use with `$kirby->roles()`. For retrieving
|
||||
* which roles are available for a specific user,
|
||||
* use `$user->roles()` without additional filters.
|
||||
*
|
||||
* @return $this|static
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function canBeChanged(): static
|
||||
{
|
||||
if (App::instance()->user()) {
|
||||
if (App::instance()->user()?->isAdmin() !== true) {
|
||||
return $this->filter(function ($role) {
|
||||
$newUser = new User([
|
||||
'email' => 'test@getkirby.com',
|
||||
|
|
@ -50,14 +54,16 @@ class Roles extends Collection
|
|||
/**
|
||||
* Returns a filtered list of all
|
||||
* roles that can be created by the
|
||||
* current user
|
||||
* current user.
|
||||
*
|
||||
* Use with `$kirby->roles()`.
|
||||
*
|
||||
* @return $this|static
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function canBeCreated(): static
|
||||
{
|
||||
if (App::instance()->user()) {
|
||||
if (App::instance()->user()?->isAdmin() !== true) {
|
||||
return $this->filter(function ($role) {
|
||||
$newUser = new User([
|
||||
'email' => 'test@getkirby.com',
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class UpdateStatus
|
|||
/**
|
||||
* Host to request the update data from
|
||||
*/
|
||||
public static string $host = 'https://assets.getkirby.com';
|
||||
public static string $host = 'https://getkirby.com';
|
||||
|
||||
/**
|
||||
* Marker that stores whether a previous remote
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Kirby\Cms;
|
||||
|
||||
use Kirby\Http\Url as BaseUrl;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
/**
|
||||
* The `Url` class extends the
|
||||
|
|
@ -31,6 +32,26 @@ class Url extends BaseUrl
|
|||
return App::instance()->url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a string to a safe version to be used in a URL,
|
||||
* obeying the `slugs.maxlength` option
|
||||
*
|
||||
* @param string $string The unsafe string
|
||||
* @param string $separator To be used instead of space and
|
||||
* other non-word characters.
|
||||
* @param string $allowed List of all allowed characters (regex)
|
||||
* @param int $maxlength The maximum length of the slug
|
||||
* @return string The safe string
|
||||
*/
|
||||
public static function slug(
|
||||
string $string = null,
|
||||
string $separator = null,
|
||||
string $allowed = null,
|
||||
): string {
|
||||
$maxlength = App::instance()->option('slugs.maxlength', 255);
|
||||
return Str::slug($string, $separator, $allowed, $maxlength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an absolute Url to a template asset if it exists.
|
||||
* This is used in the `css()` and `js()` helpers
|
||||
|
|
|
|||
|
|
@ -574,33 +574,24 @@ class User extends ModelWithContent
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns all available roles
|
||||
* for this user, that can be selected
|
||||
* by the authenticated user
|
||||
* Returns all available roles for this user,
|
||||
* that the authenticated user can change to.
|
||||
*
|
||||
* For all roles the current user can create
|
||||
* use `$kirby->roles()->canBeCreated()`.
|
||||
*/
|
||||
public function roles(): Roles
|
||||
{
|
||||
$kirby = $this->kirby();
|
||||
$roles = $kirby->roles();
|
||||
|
||||
// a collection with just the one role of the user
|
||||
$myRole = $roles->filter('id', $this->role()->id());
|
||||
|
||||
// if there's an authenticated user …
|
||||
// admin users can select pretty much any role
|
||||
if ($kirby->user()?->isAdmin() === true) {
|
||||
// except if the user is the last admin
|
||||
if ($this->isLastAdmin() === true) {
|
||||
// in which case they have to stay admin
|
||||
return $myRole;
|
||||
}
|
||||
|
||||
// return all roles for mighty admins
|
||||
return $roles;
|
||||
// if the authenticated user doesn't have the permission to change
|
||||
// the role of this user, only the current role is available
|
||||
if ($this->permissions()->can('changeRole') === false) {
|
||||
return $roles->filter('id', $this->role()->id());
|
||||
}
|
||||
|
||||
// any other user can only keep their role
|
||||
return $myRole;
|
||||
return $roles->canBeCreated();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -666,7 +657,7 @@ class User extends ModelWithContent
|
|||
*/
|
||||
protected function siblingsCollection(): Users
|
||||
{
|
||||
return $this->kirby()->users();
|
||||
return $this->kirby()->users()->sortBy('username', 'asc');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,20 @@ class UserPermissions extends ModelPermissions
|
|||
|
||||
protected function canChangeRole(): bool
|
||||
{
|
||||
return $this->model->roles()->count() > 1;
|
||||
// protect admin from role changes by non-admin
|
||||
if (
|
||||
$this->model->isAdmin() === true &&
|
||||
$this->user->isAdmin() !== true
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// prevent demoting the last admin
|
||||
if ($this->model->isLastAdmin() === true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function canCreate(): bool
|
||||
|
|
|
|||
|
|
@ -101,17 +101,6 @@ class UserRules
|
|||
*/
|
||||
public static function changeRole(User $user, string $role): bool
|
||||
{
|
||||
// protect admin from role changes by non-admin
|
||||
if (
|
||||
$user->kirby()->user()->isAdmin() === false &&
|
||||
$user->isAdmin() === true
|
||||
) {
|
||||
throw new PermissionException([
|
||||
'key' => 'user.changeRole.permission',
|
||||
'data' => ['name' => $user->username()]
|
||||
]);
|
||||
}
|
||||
|
||||
// prevent non-admins making a user to admin
|
||||
if (
|
||||
$user->kirby()->user()->isAdmin() === false &&
|
||||
|
|
@ -122,8 +111,7 @@ class UserRules
|
|||
]);
|
||||
}
|
||||
|
||||
static::validRole($user, $role);
|
||||
|
||||
// prevent demoting the last admin
|
||||
if ($role !== 'admin' && $user->isLastAdmin() === true) {
|
||||
throw new LogicException([
|
||||
'key' => 'user.changeRole.lastAdmin',
|
||||
|
|
@ -131,6 +119,7 @@ class UserRules
|
|||
]);
|
||||
}
|
||||
|
||||
// check permissions
|
||||
if ($user->permissions()->changeRole() !== true) {
|
||||
throw new PermissionException([
|
||||
'key' => 'user.changeRole.permission',
|
||||
|
|
@ -138,6 +127,13 @@ class UserRules
|
|||
]);
|
||||
}
|
||||
|
||||
// prevent changing to role that is not available for user
|
||||
if ($user->roles()->find($role) instanceof Role === false) {
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'user.role.invalid',
|
||||
]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -199,22 +195,27 @@ class UserRules
|
|||
return true;
|
||||
}
|
||||
|
||||
// only admins are allowed to add admins
|
||||
$role = $props['role'] ?? null;
|
||||
// allow to create the first user
|
||||
if ($user->kirby()->users()->count() === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($role === 'admin' && $currentUser?->isAdmin() === false) {
|
||||
// check user permissions
|
||||
if ($user->permissions()->create() !== true) {
|
||||
throw new PermissionException([
|
||||
'key' => 'user.create.permission'
|
||||
]);
|
||||
}
|
||||
|
||||
// check user permissions (if not on install)
|
||||
$role = $props['role'] ?? null;
|
||||
|
||||
// prevent creating a role that is not available for user
|
||||
if (
|
||||
$user->kirby()->users()->count() > 0 &&
|
||||
$user->permissions()->create() !== true
|
||||
in_array($role, [null, 'default', 'nobody'], true) === false &&
|
||||
$user->kirby()->roles()->canBeCreated()->find($role) instanceof Role === false
|
||||
) {
|
||||
throw new PermissionException([
|
||||
'key' => 'user.create.permission'
|
||||
throw new InvalidArgumentException([
|
||||
'key' => 'user.role.invalid',
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -370,6 +371,7 @@ class UserRules
|
|||
* Validates a user role
|
||||
*
|
||||
* @throws \Kirby\Exception\InvalidArgumentException If the user role does not exist
|
||||
* @deprecated 4.5.0
|
||||
*/
|
||||
public static function validRole(User $user, string $role): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,9 +124,17 @@ class Field
|
|||
*/
|
||||
public function isEmpty(): bool
|
||||
{
|
||||
$value = $this->value;
|
||||
|
||||
if (is_string($value) === true) {
|
||||
$value = trim($value);
|
||||
}
|
||||
|
||||
return
|
||||
empty($this->value) === true &&
|
||||
in_array($this->value, [0, '0', false], true) === false;
|
||||
$value === null ||
|
||||
$value === '' ||
|
||||
$value === [] ||
|
||||
$value === '[]';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Kirby\Filesystem;
|
||||
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Cms\Language;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
|
|
@ -49,7 +48,8 @@ class Filename
|
|||
public function __construct(
|
||||
protected string $filename,
|
||||
protected string $template,
|
||||
protected array $attributes = []
|
||||
protected array $attributes = [],
|
||||
protected string|null $language = null
|
||||
) {
|
||||
$this->name = $this->sanitizeName($filename);
|
||||
$this->extension = $this->sanitizeExtension(
|
||||
|
|
@ -234,13 +234,12 @@ class Filename
|
|||
{
|
||||
// temporarily store language rules
|
||||
$rules = Str::$language;
|
||||
$kirby = App::instance(null, true);
|
||||
|
||||
// if current user, add rules for their language to `Str` class
|
||||
if ($user = $kirby?->user()) {
|
||||
// add rules for a particular language to `Str` class
|
||||
if ($this->language !== null) {
|
||||
Str::$language = [
|
||||
...Str::$language,
|
||||
...Language::loadRules($user->language())];
|
||||
...Language::loadRules($this->language)];
|
||||
}
|
||||
|
||||
// sanitize name
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class Image extends File
|
|||
protected Dimensions|null $dimensions = null;
|
||||
|
||||
public static array $resizableTypes = [
|
||||
'avif',
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'gif',
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ class OptionsApi extends OptionsProvider
|
|||
public string $url,
|
||||
public string|null $query = null,
|
||||
public string|null $text = null,
|
||||
public string|null $value = null
|
||||
public string|null $value = null,
|
||||
public string|null $icon = null,
|
||||
public string|null $info = null
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -46,10 +48,12 @@ class OptionsApi extends OptionsProvider
|
|||
}
|
||||
|
||||
return new static(
|
||||
url: $props['url'],
|
||||
url : $props['url'],
|
||||
query: $props['query'] ?? $props['fetch'] ?? null,
|
||||
text: $props['text'] ?? null,
|
||||
value: $props['value'] ?? null
|
||||
text : $props['text'] ?? null,
|
||||
value: $props['value'] ?? null,
|
||||
icon : $props['icon'] ?? null,
|
||||
info : $props['info'] ?? null
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +142,10 @@ class OptionsApi extends OptionsProvider
|
|||
'value' => $model->toString($this->value, ['item' => $item]),
|
||||
// text is only a raw string when using {< >}
|
||||
// or when the safe mode is explicitly disabled (select field)
|
||||
'text' => $model->$safeMethod($this->text, ['item' => $item])
|
||||
'text' => $model->$safeMethod($this->text, ['item' => $item]),
|
||||
// additional data
|
||||
'icon' => $this->icon !== null ? $model->toString($this->icon, ['item' => $item]) : null,
|
||||
'info' => $this->info !== null ? $model->$safeMethod($this->info, ['item' => $item]) : null
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ class OptionsQuery extends OptionsProvider
|
|||
public function __construct(
|
||||
public string $query,
|
||||
public string|null $text = null,
|
||||
public string|null $value = null
|
||||
public string|null $value = null,
|
||||
public string|null $icon = null,
|
||||
public string|null $info = null
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -56,8 +58,10 @@ class OptionsQuery extends OptionsProvider
|
|||
|
||||
return new static(
|
||||
query: $props['query'] ?? $props['fetch'],
|
||||
text: $props['text'] ?? null,
|
||||
value: $props['value'] ?? null
|
||||
text : $props['text'] ?? null,
|
||||
value: $props['value'] ?? null,
|
||||
icon : $props['icon'] ?? null,
|
||||
info : $props['info'] ?? null
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +182,11 @@ class OptionsQuery extends OptionsProvider
|
|||
$safeMethod = $safeMode === true ? 'toSafeString' : 'toString';
|
||||
$text = $model->$safeMethod($this->text ?? $text, $data);
|
||||
|
||||
return compact('text', 'value');
|
||||
// additional data
|
||||
$icon = $this->icon !== null ? $model->toString($this->icon, $data) : null;
|
||||
$info = $this->info !== null ? $model->$safeMethod($this->info, $data) : null;
|
||||
|
||||
return compact('text', 'value', 'icon', 'info');
|
||||
});
|
||||
|
||||
return $this->options = Options::factory($options);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Kirby\Cms\App;
|
|||
use Kirby\Cms\File;
|
||||
use Kirby\Cms\ModelWithContent;
|
||||
use Kirby\Cms\Page;
|
||||
use Kirby\Cms\Roles;
|
||||
use Kirby\Form\Form;
|
||||
use Kirby\Http\Router;
|
||||
use Kirby\Toolkit\I18n;
|
||||
|
|
@ -191,29 +192,33 @@ class Field
|
|||
/**
|
||||
* User role radio buttons
|
||||
*/
|
||||
public static function role(array $props = []): array
|
||||
{
|
||||
$kirby = App::instance();
|
||||
$isAdmin = $kirby->user()?->isAdmin() ?? false;
|
||||
$roles = [];
|
||||
public static function role(
|
||||
array $props = [],
|
||||
Roles|null $roles = null
|
||||
): array {
|
||||
$kirby = App::instance();
|
||||
|
||||
foreach ($kirby->roles() as $role) {
|
||||
// exclude the admin role, if the user
|
||||
// is not allowed to change role to admin
|
||||
if ($role->name() === 'admin' && $isAdmin === false) {
|
||||
continue;
|
||||
}
|
||||
// if no $roles where provided, fall back to all roles
|
||||
$roles ??= $kirby->roles();
|
||||
|
||||
$roles[] = [
|
||||
'text' => $role->title(),
|
||||
'info' => $role->description() ?? I18n::translate('role.description.placeholder'),
|
||||
'value' => $role->name()
|
||||
];
|
||||
}
|
||||
// exclude the admin role, if the user
|
||||
// is not allowed to change role to admin
|
||||
$roles = $roles->filter(
|
||||
fn ($role) =>
|
||||
$role->name() !== 'admin' ||
|
||||
$kirby->user()?->isAdmin() === true
|
||||
);
|
||||
|
||||
// turn roles into radio field options
|
||||
$roles = $roles->values(fn ($role) => [
|
||||
'text' => $role->title(),
|
||||
'info' => $role->description() ?? I18n::translate('role.description.placeholder'),
|
||||
'value' => $role->name()
|
||||
]);
|
||||
|
||||
return array_merge([
|
||||
'label' => I18n::translate('role'),
|
||||
'type' => count($roles) <= 1 ? 'hidden' : 'radio',
|
||||
'type' => count($roles) < 1 ? 'hidden' : 'radio',
|
||||
'options' => $roles
|
||||
], $props);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class PageCreateDialog
|
|||
'tags',
|
||||
'tel',
|
||||
'text',
|
||||
'toggle',
|
||||
'toggles',
|
||||
'time',
|
||||
'url'
|
||||
|
|
@ -247,8 +248,9 @@ class PageCreateDialog
|
|||
*/
|
||||
public function model(): Page
|
||||
{
|
||||
// TODO: use actual in-memory page in v5
|
||||
return $this->model ??= Page::factory([
|
||||
'slug' => 'new',
|
||||
'slug' => '__new__',
|
||||
'template' => $this->template,
|
||||
'model' => $this->template,
|
||||
'parent' => $this->parent instanceof Page ? $this->parent : null
|
||||
|
|
@ -266,12 +268,7 @@ class PageCreateDialog
|
|||
|
||||
// create temporary page object
|
||||
// to resolve the template strings
|
||||
$page = new Page([
|
||||
'slug' => 'tmp',
|
||||
'template' => $this->template,
|
||||
'parent' => $this->model(),
|
||||
'content' => $input
|
||||
]);
|
||||
$page = $this->model()->clone(['content' => $input]);
|
||||
|
||||
if (is_string($title)) {
|
||||
$input['title'] = $page->toSafeString($title);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class User extends Model
|
|||
'dialog' => $url . '/changeRole',
|
||||
'icon' => 'bolt',
|
||||
'text' => I18n::translate('user.changeRole'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions)
|
||||
'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions) || $this->model->roles()->count() < 2
|
||||
];
|
||||
|
||||
$result[] = [
|
||||
|
|
@ -218,14 +218,19 @@ class User extends Model
|
|||
*/
|
||||
public function props(): array
|
||||
{
|
||||
$user = $this->model;
|
||||
$account = $user->isLoggedIn();
|
||||
$user = $this->model;
|
||||
$account = $user->isLoggedIn();
|
||||
$permissions = $this->options();
|
||||
|
||||
return array_merge(
|
||||
parent::props(),
|
||||
$account ? [] : $this->prevNext(),
|
||||
$this->prevNext(),
|
||||
[
|
||||
'blueprint' => $this->model->role()->name(),
|
||||
'blueprint' => $this->model->role()->name(),
|
||||
'canChangeEmail' => $permissions['changeEmail'],
|
||||
'canChangeLanguage' => $permissions['changeLanguage'],
|
||||
'canChangeName' => $permissions['changeName'],
|
||||
'canChangeRole' => $this->model->roles()->count() > 1,
|
||||
'model' => [
|
||||
'account' => $account,
|
||||
'avatar' => $user->avatar()?->url(),
|
||||
|
|
|
|||
|
|
@ -275,6 +275,9 @@ class View
|
|||
|
||||
return [
|
||||
'$config' => fn () => [
|
||||
'api' => [
|
||||
'methodOverwrite' => $kirby->option('api.methodOverwrite', true)
|
||||
],
|
||||
'debug' => $kirby->option('debug', false),
|
||||
'kirbytext' => $kirby->option('panel.kirbytext', true),
|
||||
'translation' => $kirby->option('panel.language', 'en'),
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ class Collection extends Iterator implements Countable
|
|||
* Low-level setter for elements
|
||||
*
|
||||
* @param string $key string or array
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function __set(string $key, $value): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -102,4 +102,12 @@ class Obj extends stdClass
|
|||
{
|
||||
return json_encode($this->toArray(), ...$arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the property names as keys
|
||||
*/
|
||||
public function toKeys(): array
|
||||
{
|
||||
return array_keys((array)$this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1132,7 +1132,7 @@ class Str
|
|||
string $string = null,
|
||||
string $separator = null,
|
||||
string $allowed = null,
|
||||
int $maxlength = 128
|
||||
int|false $maxlength = 128
|
||||
): string {
|
||||
$separator ??= static::$defaults['slug']['separator'];
|
||||
$allowed ??= static::$defaults['slug']['allowed'];
|
||||
|
|
@ -1165,7 +1165,11 @@ class Str
|
|||
$string = preg_replace('![^a-z0-9]+$!', '', $string);
|
||||
|
||||
// cut the string after the given maxlength
|
||||
return static::short($string, $maxlength, '');
|
||||
if ($maxlength !== false) {
|
||||
$string = static::short($string, $maxlength, '');
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Kirby\Uuid;
|
||||
|
||||
use Generator;
|
||||
use Kirby\Cms\App;
|
||||
use Kirby\Cms\File;
|
||||
|
||||
/**
|
||||
|
|
@ -83,4 +84,18 @@ class FileUuid extends ModelUuid
|
|||
'filename' => $model->filename()
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permalink url
|
||||
*/
|
||||
public function url(): string
|
||||
{
|
||||
// make sure UUID is cached because the permalink
|
||||
// route only looks up UUIDs from cache
|
||||
if ($this->isCached() === false) {
|
||||
$this->populate();
|
||||
}
|
||||
|
||||
return App::instance()->url() . '/@/' . static::TYPE . '/' . $this->id();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Kirby\Uuid;
|
||||
|
||||
use Kirby\Cms\App;
|
||||
|
||||
/**
|
||||
* Base for UUIDs for models where id string
|
||||
* is stored in the content, such as pages and files
|
||||
|
|
@ -107,18 +105,4 @@ abstract class ModelUuid extends Uuid
|
|||
// use the most basic write method to avoid object cloning
|
||||
$this->model->writeContent($data, 'default');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permalink url
|
||||
*/
|
||||
public function url(): string
|
||||
{
|
||||
// make sure UUID is cached because the permalink
|
||||
// route only looks up UUIDs from cache
|
||||
if ($this->isCached() === false) {
|
||||
$this->populate();
|
||||
}
|
||||
|
||||
return App::instance()->url() . '/@/' . static::TYPE . '/' . $this->id();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,4 +54,25 @@ class PageUuid extends ModelUuid
|
|||
yield from static::index($page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permalink url
|
||||
*/
|
||||
public function url(): string
|
||||
{
|
||||
// make sure UUID is cached because the permalink
|
||||
// route only looks up UUIDs from cache
|
||||
if ($this->isCached() === false) {
|
||||
$this->populate();
|
||||
}
|
||||
|
||||
$kirby = App::instance();
|
||||
$url = $kirby->url();
|
||||
|
||||
if ($language = $kirby->language('current')) {
|
||||
$url .= '/' . $language->code();
|
||||
}
|
||||
|
||||
return $url . '/@/' . static::TYPE . '/' . $this->id();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
25
public/kirby/vendor/autoload.php
vendored
25
public/kirby/vendor/autoload.php
vendored
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, $err);
|
||||
} elseif (!headers_sent()) {
|
||||
echo $err;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
$err,
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit0bf5c8a9cfa251a218fc581ac888fe35::getLoader();
|
||||
119
public/kirby/vendor/bin/yaml-lint
vendored
119
public/kirby/vendor/bin/yaml-lint
vendored
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../symfony/yaml/Resources/bin/yaml-lint)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint');
|
||||
}
|
||||
}
|
||||
|
||||
return include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint';
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2013-2014 Christian Riesen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Base32;
|
||||
|
||||
/**
|
||||
* Base32 encoder and decoder.
|
||||
*
|
||||
* RFC 4648 compliant
|
||||
*
|
||||
* @see http://www.ietf.org/rfc/rfc4648.txt
|
||||
* Some groundwork based on this class
|
||||
* https://github.com/NTICompass/PHP-Base32
|
||||
*
|
||||
* @author Christian Riesen <chris.riesen@gmail.com>
|
||||
* @author Sam Williams <sam@badcow.co>
|
||||
*
|
||||
* @see http://christianriesen.com
|
||||
*
|
||||
* @license MIT License see LICENSE file
|
||||
*/
|
||||
class Base32
|
||||
{
|
||||
/**
|
||||
* Alphabet for encoding and decoding base32.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected const ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=';
|
||||
|
||||
protected const BASE32HEX_PATTERN = '/[^A-Z2-7]/';
|
||||
|
||||
/**
|
||||
* Maps the Base32 character to its corresponding bit value.
|
||||
*/
|
||||
protected const MAPPING = [
|
||||
'=' => 0b00000,
|
||||
'A' => 0b00000,
|
||||
'B' => 0b00001,
|
||||
'C' => 0b00010,
|
||||
'D' => 0b00011,
|
||||
'E' => 0b00100,
|
||||
'F' => 0b00101,
|
||||
'G' => 0b00110,
|
||||
'H' => 0b00111,
|
||||
'I' => 0b01000,
|
||||
'J' => 0b01001,
|
||||
'K' => 0b01010,
|
||||
'L' => 0b01011,
|
||||
'M' => 0b01100,
|
||||
'N' => 0b01101,
|
||||
'O' => 0b01110,
|
||||
'P' => 0b01111,
|
||||
'Q' => 0b10000,
|
||||
'R' => 0b10001,
|
||||
'S' => 0b10010,
|
||||
'T' => 0b10011,
|
||||
'U' => 0b10100,
|
||||
'V' => 0b10101,
|
||||
'W' => 0b10110,
|
||||
'X' => 0b10111,
|
||||
'Y' => 0b11000,
|
||||
'Z' => 0b11001,
|
||||
'2' => 0b11010,
|
||||
'3' => 0b11011,
|
||||
'4' => 0b11100,
|
||||
'5' => 0b11101,
|
||||
'6' => 0b11110,
|
||||
'7' => 0b11111,
|
||||
];
|
||||
|
||||
/**
|
||||
* Encodes into base32.
|
||||
*
|
||||
* @param string $string Clear text string
|
||||
*
|
||||
* @return string Base32 encoded string
|
||||
*/
|
||||
public static function encode(string $string): string
|
||||
{
|
||||
// Empty string results in empty string
|
||||
if ('' === $string) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$encoded = '';
|
||||
|
||||
//Set the initial values
|
||||
$n = $bitLen = $val = 0;
|
||||
$len = \strlen($string);
|
||||
|
||||
//Pad the end of the string - this ensures that there are enough zeros
|
||||
$string .= \str_repeat(\chr(0), 4);
|
||||
|
||||
//Explode string into integers
|
||||
$chars = (array) \unpack('C*', $string, 0);
|
||||
|
||||
while ($n < $len || 0 !== $bitLen) {
|
||||
//If the bit length has fallen below 5, shift left 8 and add the next character.
|
||||
if ($bitLen < 5) {
|
||||
$val = $val << 8;
|
||||
$bitLen += 8;
|
||||
$n++;
|
||||
$val += $chars[$n];
|
||||
}
|
||||
$shift = $bitLen - 5;
|
||||
$encoded .= ($n - (int)($bitLen > 8) > $len && 0 == $val) ? '=' : static::ALPHABET[$val >> $shift];
|
||||
$val = $val & ((1 << $shift) - 1);
|
||||
$bitLen -= 5;
|
||||
}
|
||||
|
||||
return $encoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes base32.
|
||||
*
|
||||
* @param string $base32String Base32 encoded string
|
||||
*
|
||||
* @return string Clear text string
|
||||
*/
|
||||
public static function decode(string $base32String): string
|
||||
{
|
||||
// Only work in upper cases
|
||||
$base32String = \strtoupper($base32String);
|
||||
|
||||
// Remove anything that is not base32 alphabet
|
||||
$base32String = \preg_replace(static::BASE32HEX_PATTERN, '', $base32String);
|
||||
|
||||
// Empty string results in empty string
|
||||
if ('' === $base32String || null === $base32String) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$decoded = '';
|
||||
|
||||
//Set the initial values
|
||||
$len = \strlen($base32String);
|
||||
$n = 0;
|
||||
$bitLen = 5;
|
||||
$val = static::MAPPING[$base32String[0]];
|
||||
|
||||
while ($n < $len) {
|
||||
//If the bit length has fallen below 8, shift left 5 and add the next pentet.
|
||||
if ($bitLen < 8) {
|
||||
$val = $val << 5;
|
||||
$bitLen += 5;
|
||||
$n++;
|
||||
$pentet = $base32String[$n] ?? '=';
|
||||
|
||||
//If the new pentet is padding, make this the last iteration.
|
||||
if ('=' === $pentet) {
|
||||
$n = $len;
|
||||
}
|
||||
$val += static::MAPPING[$pentet];
|
||||
continue;
|
||||
}
|
||||
$shift = $bitLen - 8;
|
||||
|
||||
$decoded .= \chr($val >> $shift);
|
||||
$val = $val & ((1 << $shift) - 1);
|
||||
$bitLen -= 8;
|
||||
}
|
||||
|
||||
return $decoded;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Base32;
|
||||
|
||||
/**
|
||||
* Base32Hex encoder and decoder.
|
||||
*
|
||||
* RFC 4648 compliant
|
||||
* @see http://www.ietf.org/rfc/rfc4648.txt
|
||||
*
|
||||
* @author Sam Williams <sam@badcow.co>
|
||||
*
|
||||
* @see http://christianriesen.com
|
||||
*
|
||||
* @license MIT License see LICENSE file
|
||||
*/
|
||||
class Base32Hex extends Base32
|
||||
{
|
||||
/**
|
||||
* Alphabet for encoding and decoding base32 extended hex.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected const ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUV=';
|
||||
|
||||
protected const BASE32HEX_PATTERN = '/[^0-9A-V]/';
|
||||
|
||||
/**
|
||||
* Maps the Base32 character to its corresponding bit value.
|
||||
*/
|
||||
protected const MAPPING = [
|
||||
'=' => 0b00000,
|
||||
'0' => 0b00000,
|
||||
'1' => 0b00001,
|
||||
'2' => 0b00010,
|
||||
'3' => 0b00011,
|
||||
'4' => 0b00100,
|
||||
'5' => 0b00101,
|
||||
'6' => 0b00110,
|
||||
'7' => 0b00111,
|
||||
'8' => 0b01000,
|
||||
'9' => 0b01001,
|
||||
'A' => 0b01010,
|
||||
'B' => 0b01011,
|
||||
'C' => 0b01100,
|
||||
'D' => 0b01101,
|
||||
'E' => 0b01110,
|
||||
'F' => 0b01111,
|
||||
'G' => 0b10000,
|
||||
'H' => 0b10001,
|
||||
'I' => 0b10010,
|
||||
'J' => 0b10011,
|
||||
'K' => 0b10100,
|
||||
'L' => 0b10101,
|
||||
'M' => 0b10110,
|
||||
'N' => 0b10111,
|
||||
'O' => 0b11000,
|
||||
'P' => 0b11001,
|
||||
'Q' => 0b11010,
|
||||
'R' => 0b11011,
|
||||
'S' => 0b11100,
|
||||
'T' => 0b11101,
|
||||
'U' => 0b11110,
|
||||
'V' => 0b11111,
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
Copyright 2017 A Beautiful Site, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"name": "claviska/simpleimage",
|
||||
"description": "A PHP class that makes working with images as simple as possible.",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=8.0",
|
||||
"ext-gd": "*",
|
||||
"league/color-extractor": "0.4.*"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Cory LaViska",
|
||||
"homepage": "http://www.abeautifulsite.net/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"claviska": "src/"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/pint": "^1.5",
|
||||
"phpstan/phpstan": "^1.10"
|
||||
}
|
||||
}
|
||||
209
public/kirby/vendor/claviska/simpleimage/composer.lock
generated
vendored
209
public/kirby/vendor/claviska/simpleimage/composer.lock
generated
vendored
|
|
@ -1,209 +0,0 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "eb94dc95686ec297093755af85d5e7dd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "league/color-extractor",
|
||||
"version": "0.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/color-extractor.git",
|
||||
"reference": "21fcac6249c5ef7d00eb83e128743ee6678fe505"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/color-extractor/zipball/21fcac6249c5ef7d00eb83e128743ee6678fe505",
|
||||
"reference": "21fcac6249c5ef7d00eb83e128743ee6678fe505",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-gd": "*",
|
||||
"php": "^7.3 || ^8.0"
|
||||
},
|
||||
"replace": {
|
||||
"matthecat/colorextractor": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "~2",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "To download images from remote URLs if allow_url_fopen is disabled for security reasons"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\ColorExtractor\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mathieu Lechat",
|
||||
"email": "math.lechat@gmail.com",
|
||||
"homepage": "http://matthecat.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Extract colors from an image as a human would do.",
|
||||
"homepage": "https://github.com/thephpleague/color-extractor",
|
||||
"keywords": [
|
||||
"color",
|
||||
"extract",
|
||||
"human",
|
||||
"image",
|
||||
"palette"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/color-extractor/issues",
|
||||
"source": "https://github.com/thephpleague/color-extractor/tree/0.4.0"
|
||||
},
|
||||
"time": "2022-09-24T15:57:16+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/pint.git",
|
||||
"reference": "e0a8cef58b74662f27355be9cdea0e726bbac362"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/e0a8cef58b74662f27355be9cdea0e726bbac362",
|
||||
"reference": "e0a8cef58b74662f27355be9cdea0e726bbac362",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xml": "*",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.14.4",
|
||||
"illuminate/view": "^9.51.0",
|
||||
"laravel-zero/framework": "^9.2.0",
|
||||
"mockery/mockery": "^1.5.1",
|
||||
"nunomaduro/larastan": "^2.4.0",
|
||||
"nunomaduro/termwind": "^1.15.1",
|
||||
"pestphp/pest": "^1.22.4"
|
||||
},
|
||||
"bin": [
|
||||
"builds/pint"
|
||||
],
|
||||
"type": "project",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Seeders\\": "database/seeders/",
|
||||
"Database\\Factories\\": "database/factories/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nuno Maduro",
|
||||
"email": "enunomaduro@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "An opinionated code formatter for PHP.",
|
||||
"homepage": "https://laravel.com",
|
||||
"keywords": [
|
||||
"format",
|
||||
"formatter",
|
||||
"lint",
|
||||
"linter",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/pint/issues",
|
||||
"source": "https://github.com/laravel/pint"
|
||||
},
|
||||
"time": "2023-02-14T16:31:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.10.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "a2ffec7db373d8da4973d1d62add872db5cd22dd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/a2ffec7db373d8da4973d1d62add872db5cd22dd",
|
||||
"reference": "a2ffec7db373d8da4973d1d62add872db5cd22dd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan-shim": "*"
|
||||
},
|
||||
"bin": [
|
||||
"phpstan",
|
||||
"phpstan.phar"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"keywords": [
|
||||
"dev",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.10.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/ondrejmirtes",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/phpstan",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-23T14:36:46+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=8.0",
|
||||
"ext-gd": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
579
public/kirby/vendor/composer/ClassLoader.php
vendored
579
public/kirby/vendor/composer/ClassLoader.php
vendored
|
|
@ -1,579 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see https://www.php-fig.org/psr/psr-0/
|
||||
* @see https://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
/** @var \Closure(string):void */
|
||||
private static $includeFile;
|
||||
|
||||
/** @var string|null */
|
||||
private $vendorDir;
|
||||
|
||||
// PSR-4
|
||||
/**
|
||||
* @var array<string, array<string, int>>
|
||||
*/
|
||||
private $prefixLengthsPsr4 = array();
|
||||
/**
|
||||
* @var array<string, list<string>>
|
||||
*/
|
||||
private $prefixDirsPsr4 = array();
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
/**
|
||||
* List of PSR-0 prefixes
|
||||
*
|
||||
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
|
||||
*
|
||||
* @var array<string, array<string, list<string>>>
|
||||
*/
|
||||
private $prefixesPsr0 = array();
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
/** @var bool */
|
||||
private $useIncludePath = false;
|
||||
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private $classMap = array();
|
||||
|
||||
/** @var bool */
|
||||
private $classMapAuthoritative = false;
|
||||
|
||||
/**
|
||||
* @var array<string, bool>
|
||||
*/
|
||||
private $missingClasses = array();
|
||||
|
||||
/** @var string|null */
|
||||
private $apcuPrefix;
|
||||
|
||||
/**
|
||||
* @var array<string, self>
|
||||
*/
|
||||
private static $registeredLoaders = array();
|
||||
|
||||
/**
|
||||
* @param string|null $vendorDir
|
||||
*/
|
||||
public function __construct($vendorDir = null)
|
||||
{
|
||||
$this->vendorDir = $vendorDir;
|
||||
self::initializeIncludeClosure();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, list<string>>
|
||||
*/
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string> Array of classname => path
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, string> $classMap Class to filename map
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
$paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
$paths = (array) $paths;
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
$paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
$paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param list<string>|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param list<string>|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
|
||||
if (null === $this->vendorDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($prepend) {
|
||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||
} else {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
self::$registeredLoaders[$this->vendorDir] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
|
||||
if (null !== $this->vendorDir) {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return true|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
$includeFile = self::$includeFile;
|
||||
$includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently registered loaders keyed by their corresponding vendor directories.
|
||||
*
|
||||
* @return array<string, self>
|
||||
*/
|
||||
public static function getRegisteredLoaders()
|
||||
{
|
||||
return self::$registeredLoaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $ext
|
||||
* @return string|false
|
||||
*/
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private static function initializeIncludeClosure()
|
||||
{
|
||||
if (self::$includeFile !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
self::$includeFile = \Closure::bind(static function($file) {
|
||||
include $file;
|
||||
}, null, null);
|
||||
}
|
||||
}
|
||||
359
public/kirby/vendor/composer/InstalledVersions.php
vendored
359
public/kirby/vendor/composer/InstalledVersions.php
vendored
|
|
@ -1,359 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Composer\Semver\VersionParser;
|
||||
|
||||
/**
|
||||
* This class is copied in every Composer installed project and available to all
|
||||
*
|
||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private static $canGetVendors;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
/**
|
||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
||||
*
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
$packages = array();
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
$packages[] = array_keys($installed['versions']);
|
||||
}
|
||||
|
||||
if (1 === \count($packages)) {
|
||||
return $packages[0];
|
||||
}
|
||||
|
||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all package names with a specific type e.g. 'library'
|
||||
*
|
||||
* @param string $type
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackagesByType($type)
|
||||
{
|
||||
$packagesByType = array();
|
||||
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
foreach ($installed['versions'] as $name => $package) {
|
||||
if (isset($package['type']) && $package['type'] === $type) {
|
||||
$packagesByType[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $packagesByType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package is installed
|
||||
*
|
||||
* This also returns true if the package name is provided or replaced by another package
|
||||
*
|
||||
* @param string $packageName
|
||||
* @param bool $includeDevRequirements
|
||||
* @return bool
|
||||
*/
|
||||
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (isset($installed['versions'][$packageName])) {
|
||||
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package satisfies a version constraint
|
||||
*
|
||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
||||
*
|
||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
||||
*
|
||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||
* @param string $packageName
|
||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
||||
* @return bool
|
||||
*/
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints((string) $constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
||||
*
|
||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
||||
* whether a given version of a package is installed, and not just whether it exists
|
||||
*
|
||||
* @param string $packageName
|
||||
* @return string Version constraint usable with composer/semver
|
||||
*/
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
||||
*/
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
||||
*/
|
||||
public static function getInstallPath($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
$installed = self::getInstalled();
|
||||
|
||||
return $installed[0]['root'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw installed.php data for custom implementations
|
||||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
return self::getInstalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets you reload the static array from another file
|
||||
*
|
||||
* This is only useful for complex integrations in which a project needs to use
|
||||
* this class but then also needs to execute another project's autoloader in process,
|
||||
* and wants to ensure both projects have access to their version of installed.php.
|
||||
*
|
||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
||||
* the data it needs from this class, then call reload() with
|
||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
||||
* the project in which it runs can then also use this class safely, without
|
||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
||||
*
|
||||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
if (null === self::$canGetVendors) {
|
||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
||||
}
|
||||
|
||||
$installed = array();
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require $vendorDir.'/composer/installed.php';
|
||||
$installed[] = self::$installedByVendor[$vendorDir] = $required;
|
||||
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
||||
self::$installed = $installed[count($installed) - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require __DIR__ . '/installed.php';
|
||||
self::$installed = $required;
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
if (self::$installed !== array()) {
|
||||
$installed[] = self::$installed;
|
||||
}
|
||||
|
||||
return $installed;
|
||||
}
|
||||
}
|
||||
21
public/kirby/vendor/composer/LICENSE
vendored
21
public/kirby/vendor/composer/LICENSE
vendored
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
414
public/kirby/vendor/composer/autoload_classmap.php
vendored
414
public/kirby/vendor/composer/autoload_classmap.php
vendored
|
|
@ -1,414 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Base32\\Base32' => $vendorDir . '/christian-riesen/base32/src/Base32.php',
|
||||
'Base32\\Base32Hex' => $vendorDir . '/christian-riesen/base32/src/Base32Hex.php',
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php',
|
||||
'Composer\\Semver\\CompilingMatcher' => $vendorDir . '/composer/semver/src/CompilingMatcher.php',
|
||||
'Composer\\Semver\\Constraint\\Bound' => $vendorDir . '/composer/semver/src/Constraint/Bound.php',
|
||||
'Composer\\Semver\\Constraint\\Constraint' => $vendorDir . '/composer/semver/src/Constraint/Constraint.php',
|
||||
'Composer\\Semver\\Constraint\\ConstraintInterface' => $vendorDir . '/composer/semver/src/Constraint/ConstraintInterface.php',
|
||||
'Composer\\Semver\\Constraint\\MatchAllConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchAllConstraint.php',
|
||||
'Composer\\Semver\\Constraint\\MatchNoneConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
|
||||
'Composer\\Semver\\Constraint\\MultiConstraint' => $vendorDir . '/composer/semver/src/Constraint/MultiConstraint.php',
|
||||
'Composer\\Semver\\Interval' => $vendorDir . '/composer/semver/src/Interval.php',
|
||||
'Composer\\Semver\\Intervals' => $vendorDir . '/composer/semver/src/Intervals.php',
|
||||
'Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php',
|
||||
'Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php',
|
||||
'Kirby\\Api\\Api' => $baseDir . '/src/Api/Api.php',
|
||||
'Kirby\\Api\\Collection' => $baseDir . '/src/Api/Collection.php',
|
||||
'Kirby\\Api\\Model' => $baseDir . '/src/Api/Model.php',
|
||||
'Kirby\\Blueprint\\Collection' => $baseDir . '/src/Blueprint/Collection.php',
|
||||
'Kirby\\Blueprint\\Config' => $baseDir . '/src/Blueprint/Config.php',
|
||||
'Kirby\\Blueprint\\Extension' => $baseDir . '/src/Blueprint/Extension.php',
|
||||
'Kirby\\Blueprint\\Factory' => $baseDir . '/src/Blueprint/Factory.php',
|
||||
'Kirby\\Blueprint\\Node' => $baseDir . '/src/Blueprint/Node.php',
|
||||
'Kirby\\Blueprint\\NodeI18n' => $baseDir . '/src/Blueprint/NodeI18n.php',
|
||||
'Kirby\\Blueprint\\NodeIcon' => $baseDir . '/src/Blueprint/NodeIcon.php',
|
||||
'Kirby\\Blueprint\\NodeProperty' => $baseDir . '/src/Blueprint/NodeProperty.php',
|
||||
'Kirby\\Blueprint\\NodeString' => $baseDir . '/src/Blueprint/NodeString.php',
|
||||
'Kirby\\Blueprint\\NodeText' => $baseDir . '/src/Blueprint/NodeText.php',
|
||||
'Kirby\\Cache\\ApcuCache' => $baseDir . '/src/Cache/ApcuCache.php',
|
||||
'Kirby\\Cache\\Cache' => $baseDir . '/src/Cache/Cache.php',
|
||||
'Kirby\\Cache\\FileCache' => $baseDir . '/src/Cache/FileCache.php',
|
||||
'Kirby\\Cache\\MemCached' => $baseDir . '/src/Cache/MemCached.php',
|
||||
'Kirby\\Cache\\MemoryCache' => $baseDir . '/src/Cache/MemoryCache.php',
|
||||
'Kirby\\Cache\\NullCache' => $baseDir . '/src/Cache/NullCache.php',
|
||||
'Kirby\\Cache\\Value' => $baseDir . '/src/Cache/Value.php',
|
||||
'Kirby\\Cms\\Api' => $baseDir . '/src/Cms/Api.php',
|
||||
'Kirby\\Cms\\App' => $baseDir . '/src/Cms/App.php',
|
||||
'Kirby\\Cms\\AppCaches' => $baseDir . '/src/Cms/AppCaches.php',
|
||||
'Kirby\\Cms\\AppErrors' => $baseDir . '/src/Cms/AppErrors.php',
|
||||
'Kirby\\Cms\\AppPlugins' => $baseDir . '/src/Cms/AppPlugins.php',
|
||||
'Kirby\\Cms\\AppTranslations' => $baseDir . '/src/Cms/AppTranslations.php',
|
||||
'Kirby\\Cms\\AppUsers' => $baseDir . '/src/Cms/AppUsers.php',
|
||||
'Kirby\\Cms\\Auth' => $baseDir . '/src/Cms/Auth.php',
|
||||
'Kirby\\Cms\\Auth\\Challenge' => $baseDir . '/src/Cms/Auth/Challenge.php',
|
||||
'Kirby\\Cms\\Auth\\EmailChallenge' => $baseDir . '/src/Cms/Auth/EmailChallenge.php',
|
||||
'Kirby\\Cms\\Auth\\Status' => $baseDir . '/src/Cms/Auth/Status.php',
|
||||
'Kirby\\Cms\\Auth\\TotpChallenge' => $baseDir . '/src/Cms/Auth/TotpChallenge.php',
|
||||
'Kirby\\Cms\\Block' => $baseDir . '/src/Cms/Block.php',
|
||||
'Kirby\\Cms\\BlockConverter' => $baseDir . '/src/Cms/BlockConverter.php',
|
||||
'Kirby\\Cms\\Blocks' => $baseDir . '/src/Cms/Blocks.php',
|
||||
'Kirby\\Cms\\Blueprint' => $baseDir . '/src/Cms/Blueprint.php',
|
||||
'Kirby\\Cms\\Collection' => $baseDir . '/src/Cms/Collection.php',
|
||||
'Kirby\\Cms\\Collections' => $baseDir . '/src/Cms/Collections.php',
|
||||
'Kirby\\Cms\\ContentLock' => $baseDir . '/src/Cms/ContentLock.php',
|
||||
'Kirby\\Cms\\ContentLocks' => $baseDir . '/src/Cms/ContentLocks.php',
|
||||
'Kirby\\Cms\\Core' => $baseDir . '/src/Cms/Core.php',
|
||||
'Kirby\\Cms\\Email' => $baseDir . '/src/Cms/Email.php',
|
||||
'Kirby\\Cms\\Event' => $baseDir . '/src/Cms/Event.php',
|
||||
'Kirby\\Cms\\Fieldset' => $baseDir . '/src/Cms/Fieldset.php',
|
||||
'Kirby\\Cms\\Fieldsets' => $baseDir . '/src/Cms/Fieldsets.php',
|
||||
'Kirby\\Cms\\File' => $baseDir . '/src/Cms/File.php',
|
||||
'Kirby\\Cms\\FileActions' => $baseDir . '/src/Cms/FileActions.php',
|
||||
'Kirby\\Cms\\FileBlueprint' => $baseDir . '/src/Cms/FileBlueprint.php',
|
||||
'Kirby\\Cms\\FileModifications' => $baseDir . '/src/Cms/FileModifications.php',
|
||||
'Kirby\\Cms\\FilePermissions' => $baseDir . '/src/Cms/FilePermissions.php',
|
||||
'Kirby\\Cms\\FilePicker' => $baseDir . '/src/Cms/FilePicker.php',
|
||||
'Kirby\\Cms\\FileRules' => $baseDir . '/src/Cms/FileRules.php',
|
||||
'Kirby\\Cms\\FileVersion' => $baseDir . '/src/Cms/FileVersion.php',
|
||||
'Kirby\\Cms\\Files' => $baseDir . '/src/Cms/Files.php',
|
||||
'Kirby\\Cms\\Find' => $baseDir . '/src/Cms/Find.php',
|
||||
'Kirby\\Cms\\HasChildren' => $baseDir . '/src/Cms/HasChildren.php',
|
||||
'Kirby\\Cms\\HasFiles' => $baseDir . '/src/Cms/HasFiles.php',
|
||||
'Kirby\\Cms\\HasMethods' => $baseDir . '/src/Cms/HasMethods.php',
|
||||
'Kirby\\Cms\\HasSiblings' => $baseDir . '/src/Cms/HasSiblings.php',
|
||||
'Kirby\\Cms\\Helpers' => $baseDir . '/src/Cms/Helpers.php',
|
||||
'Kirby\\Cms\\Html' => $baseDir . '/src/Cms/Html.php',
|
||||
'Kirby\\Cms\\Ingredients' => $baseDir . '/src/Cms/Ingredients.php',
|
||||
'Kirby\\Cms\\Item' => $baseDir . '/src/Cms/Item.php',
|
||||
'Kirby\\Cms\\Items' => $baseDir . '/src/Cms/Items.php',
|
||||
'Kirby\\Cms\\Language' => $baseDir . '/src/Cms/Language.php',
|
||||
'Kirby\\Cms\\LanguageRouter' => $baseDir . '/src/Cms/LanguageRouter.php',
|
||||
'Kirby\\Cms\\LanguageRoutes' => $baseDir . '/src/Cms/LanguageRoutes.php',
|
||||
'Kirby\\Cms\\LanguageRules' => $baseDir . '/src/Cms/LanguageRules.php',
|
||||
'Kirby\\Cms\\LanguageVariable' => $baseDir . '/src/Cms/LanguageVariable.php',
|
||||
'Kirby\\Cms\\Languages' => $baseDir . '/src/Cms/Languages.php',
|
||||
'Kirby\\Cms\\Layout' => $baseDir . '/src/Cms/Layout.php',
|
||||
'Kirby\\Cms\\LayoutColumn' => $baseDir . '/src/Cms/LayoutColumn.php',
|
||||
'Kirby\\Cms\\LayoutColumns' => $baseDir . '/src/Cms/LayoutColumns.php',
|
||||
'Kirby\\Cms\\Layouts' => $baseDir . '/src/Cms/Layouts.php',
|
||||
'Kirby\\Cms\\License' => $baseDir . '/src/Cms/License.php',
|
||||
'Kirby\\Cms\\LicenseStatus' => $baseDir . '/src/Cms/LicenseStatus.php',
|
||||
'Kirby\\Cms\\LicenseType' => $baseDir . '/src/Cms/LicenseType.php',
|
||||
'Kirby\\Cms\\Loader' => $baseDir . '/src/Cms/Loader.php',
|
||||
'Kirby\\Cms\\Media' => $baseDir . '/src/Cms/Media.php',
|
||||
'Kirby\\Cms\\Model' => $baseDir . '/src/Cms/Model.php',
|
||||
'Kirby\\Cms\\ModelPermissions' => $baseDir . '/src/Cms/ModelPermissions.php',
|
||||
'Kirby\\Cms\\ModelWithContent' => $baseDir . '/src/Cms/ModelWithContent.php',
|
||||
'Kirby\\Cms\\Nest' => $baseDir . '/src/Cms/Nest.php',
|
||||
'Kirby\\Cms\\NestCollection' => $baseDir . '/src/Cms/NestCollection.php',
|
||||
'Kirby\\Cms\\NestObject' => $baseDir . '/src/Cms/NestObject.php',
|
||||
'Kirby\\Cms\\Page' => $baseDir . '/src/Cms/Page.php',
|
||||
'Kirby\\Cms\\PageActions' => $baseDir . '/src/Cms/PageActions.php',
|
||||
'Kirby\\Cms\\PageBlueprint' => $baseDir . '/src/Cms/PageBlueprint.php',
|
||||
'Kirby\\Cms\\PagePermissions' => $baseDir . '/src/Cms/PagePermissions.php',
|
||||
'Kirby\\Cms\\PagePicker' => $baseDir . '/src/Cms/PagePicker.php',
|
||||
'Kirby\\Cms\\PageRules' => $baseDir . '/src/Cms/PageRules.php',
|
||||
'Kirby\\Cms\\PageSiblings' => $baseDir . '/src/Cms/PageSiblings.php',
|
||||
'Kirby\\Cms\\Pages' => $baseDir . '/src/Cms/Pages.php',
|
||||
'Kirby\\Cms\\Pagination' => $baseDir . '/src/Cms/Pagination.php',
|
||||
'Kirby\\Cms\\Permissions' => $baseDir . '/src/Cms/Permissions.php',
|
||||
'Kirby\\Cms\\Picker' => $baseDir . '/src/Cms/Picker.php',
|
||||
'Kirby\\Cms\\Plugin' => $baseDir . '/src/Cms/Plugin.php',
|
||||
'Kirby\\Cms\\PluginAsset' => $baseDir . '/src/Cms/PluginAsset.php',
|
||||
'Kirby\\Cms\\PluginAssets' => $baseDir . '/src/Cms/PluginAssets.php',
|
||||
'Kirby\\Cms\\R' => $baseDir . '/src/Cms/R.php',
|
||||
'Kirby\\Cms\\Responder' => $baseDir . '/src/Cms/Responder.php',
|
||||
'Kirby\\Cms\\Response' => $baseDir . '/src/Cms/Response.php',
|
||||
'Kirby\\Cms\\Role' => $baseDir . '/src/Cms/Role.php',
|
||||
'Kirby\\Cms\\Roles' => $baseDir . '/src/Cms/Roles.php',
|
||||
'Kirby\\Cms\\S' => $baseDir . '/src/Cms/S.php',
|
||||
'Kirby\\Cms\\Search' => $baseDir . '/src/Cms/Search.php',
|
||||
'Kirby\\Cms\\Section' => $baseDir . '/src/Cms/Section.php',
|
||||
'Kirby\\Cms\\Site' => $baseDir . '/src/Cms/Site.php',
|
||||
'Kirby\\Cms\\SiteActions' => $baseDir . '/src/Cms/SiteActions.php',
|
||||
'Kirby\\Cms\\SiteBlueprint' => $baseDir . '/src/Cms/SiteBlueprint.php',
|
||||
'Kirby\\Cms\\SitePermissions' => $baseDir . '/src/Cms/SitePermissions.php',
|
||||
'Kirby\\Cms\\SiteRules' => $baseDir . '/src/Cms/SiteRules.php',
|
||||
'Kirby\\Cms\\Structure' => $baseDir . '/src/Cms/Structure.php',
|
||||
'Kirby\\Cms\\StructureObject' => $baseDir . '/src/Cms/StructureObject.php',
|
||||
'Kirby\\Cms\\System' => $baseDir . '/src/Cms/System.php',
|
||||
'Kirby\\Cms\\System\\UpdateStatus' => $baseDir . '/src/Cms/System/UpdateStatus.php',
|
||||
'Kirby\\Cms\\Translation' => $baseDir . '/src/Cms/Translation.php',
|
||||
'Kirby\\Cms\\Translations' => $baseDir . '/src/Cms/Translations.php',
|
||||
'Kirby\\Cms\\Url' => $baseDir . '/src/Cms/Url.php',
|
||||
'Kirby\\Cms\\User' => $baseDir . '/src/Cms/User.php',
|
||||
'Kirby\\Cms\\UserActions' => $baseDir . '/src/Cms/UserActions.php',
|
||||
'Kirby\\Cms\\UserBlueprint' => $baseDir . '/src/Cms/UserBlueprint.php',
|
||||
'Kirby\\Cms\\UserPermissions' => $baseDir . '/src/Cms/UserPermissions.php',
|
||||
'Kirby\\Cms\\UserPicker' => $baseDir . '/src/Cms/UserPicker.php',
|
||||
'Kirby\\Cms\\UserRules' => $baseDir . '/src/Cms/UserRules.php',
|
||||
'Kirby\\Cms\\Users' => $baseDir . '/src/Cms/Users.php',
|
||||
'Kirby\\Cms\\Visitor' => $baseDir . '/src/Cms/Visitor.php',
|
||||
'Kirby\\ComposerInstaller\\CmsInstaller' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php',
|
||||
'Kirby\\ComposerInstaller\\Installer' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php',
|
||||
'Kirby\\ComposerInstaller\\Plugin' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/Plugin.php',
|
||||
'Kirby\\ComposerInstaller\\PluginInstaller' => $vendorDir . '/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php',
|
||||
'Kirby\\Content\\Content' => $baseDir . '/src/Content/Content.php',
|
||||
'Kirby\\Content\\ContentStorage' => $baseDir . '/src/Content/ContentStorage.php',
|
||||
'Kirby\\Content\\ContentStorageHandler' => $baseDir . '/src/Content/ContentStorageHandler.php',
|
||||
'Kirby\\Content\\ContentTranslation' => $baseDir . '/src/Content/ContentTranslation.php',
|
||||
'Kirby\\Content\\Field' => $baseDir . '/src/Content/Field.php',
|
||||
'Kirby\\Content\\PlainTextContentStorageHandler' => $baseDir . '/src/Content/PlainTextContentStorageHandler.php',
|
||||
'Kirby\\Data\\Data' => $baseDir . '/src/Data/Data.php',
|
||||
'Kirby\\Data\\Handler' => $baseDir . '/src/Data/Handler.php',
|
||||
'Kirby\\Data\\Json' => $baseDir . '/src/Data/Json.php',
|
||||
'Kirby\\Data\\PHP' => $baseDir . '/src/Data/PHP.php',
|
||||
'Kirby\\Data\\Txt' => $baseDir . '/src/Data/Txt.php',
|
||||
'Kirby\\Data\\Xml' => $baseDir . '/src/Data/Xml.php',
|
||||
'Kirby\\Data\\Yaml' => $baseDir . '/src/Data/Yaml.php',
|
||||
'Kirby\\Data\\YamlSpyc' => $baseDir . '/src/Data/YamlSpyc.php',
|
||||
'Kirby\\Data\\YamlSymfony' => $baseDir . '/src/Data/YamlSymfony.php',
|
||||
'Kirby\\Database\\Database' => $baseDir . '/src/Database/Database.php',
|
||||
'Kirby\\Database\\Db' => $baseDir . '/src/Database/Db.php',
|
||||
'Kirby\\Database\\Query' => $baseDir . '/src/Database/Query.php',
|
||||
'Kirby\\Database\\Sql' => $baseDir . '/src/Database/Sql.php',
|
||||
'Kirby\\Database\\Sql\\Mysql' => $baseDir . '/src/Database/Sql/Mysql.php',
|
||||
'Kirby\\Database\\Sql\\Sqlite' => $baseDir . '/src/Database/Sql/Sqlite.php',
|
||||
'Kirby\\Email\\Body' => $baseDir . '/src/Email/Body.php',
|
||||
'Kirby\\Email\\Email' => $baseDir . '/src/Email/Email.php',
|
||||
'Kirby\\Email\\PHPMailer' => $baseDir . '/src/Email/PHPMailer.php',
|
||||
'Kirby\\Exception\\AuthException' => $baseDir . '/src/Exception/AuthException.php',
|
||||
'Kirby\\Exception\\BadMethodCallException' => $baseDir . '/src/Exception/BadMethodCallException.php',
|
||||
'Kirby\\Exception\\DuplicateException' => $baseDir . '/src/Exception/DuplicateException.php',
|
||||
'Kirby\\Exception\\ErrorPageException' => $baseDir . '/src/Exception/ErrorPageException.php',
|
||||
'Kirby\\Exception\\Exception' => $baseDir . '/src/Exception/Exception.php',
|
||||
'Kirby\\Exception\\InvalidArgumentException' => $baseDir . '/src/Exception/InvalidArgumentException.php',
|
||||
'Kirby\\Exception\\LogicException' => $baseDir . '/src/Exception/LogicException.php',
|
||||
'Kirby\\Exception\\NotFoundException' => $baseDir . '/src/Exception/NotFoundException.php',
|
||||
'Kirby\\Exception\\PermissionException' => $baseDir . '/src/Exception/PermissionException.php',
|
||||
'Kirby\\Field\\FieldOptions' => $baseDir . '/src/Field/FieldOptions.php',
|
||||
'Kirby\\Filesystem\\Asset' => $baseDir . '/src/Filesystem/Asset.php',
|
||||
'Kirby\\Filesystem\\Dir' => $baseDir . '/src/Filesystem/Dir.php',
|
||||
'Kirby\\Filesystem\\F' => $baseDir . '/src/Filesystem/F.php',
|
||||
'Kirby\\Filesystem\\File' => $baseDir . '/src/Filesystem/File.php',
|
||||
'Kirby\\Filesystem\\Filename' => $baseDir . '/src/Filesystem/Filename.php',
|
||||
'Kirby\\Filesystem\\IsFile' => $baseDir . '/src/Filesystem/IsFile.php',
|
||||
'Kirby\\Filesystem\\Mime' => $baseDir . '/src/Filesystem/Mime.php',
|
||||
'Kirby\\Form\\Field' => $baseDir . '/src/Form/Field.php',
|
||||
'Kirby\\Form\\FieldClass' => $baseDir . '/src/Form/FieldClass.php',
|
||||
'Kirby\\Form\\Field\\BlocksField' => $baseDir . '/src/Form/Field/BlocksField.php',
|
||||
'Kirby\\Form\\Field\\LayoutField' => $baseDir . '/src/Form/Field/LayoutField.php',
|
||||
'Kirby\\Form\\Fields' => $baseDir . '/src/Form/Fields.php',
|
||||
'Kirby\\Form\\Form' => $baseDir . '/src/Form/Form.php',
|
||||
'Kirby\\Form\\Mixin\\EmptyState' => $baseDir . '/src/Form/Mixin/EmptyState.php',
|
||||
'Kirby\\Form\\Mixin\\Max' => $baseDir . '/src/Form/Mixin/Max.php',
|
||||
'Kirby\\Form\\Mixin\\Min' => $baseDir . '/src/Form/Mixin/Min.php',
|
||||
'Kirby\\Form\\Validations' => $baseDir . '/src/Form/Validations.php',
|
||||
'Kirby\\Http\\Cookie' => $baseDir . '/src/Http/Cookie.php',
|
||||
'Kirby\\Http\\Environment' => $baseDir . '/src/Http/Environment.php',
|
||||
'Kirby\\Http\\Exceptions\\NextRouteException' => $baseDir . '/src/Http/Exceptions/NextRouteException.php',
|
||||
'Kirby\\Http\\Header' => $baseDir . '/src/Http/Header.php',
|
||||
'Kirby\\Http\\Idn' => $baseDir . '/src/Http/Idn.php',
|
||||
'Kirby\\Http\\Params' => $baseDir . '/src/Http/Params.php',
|
||||
'Kirby\\Http\\Path' => $baseDir . '/src/Http/Path.php',
|
||||
'Kirby\\Http\\Query' => $baseDir . '/src/Http/Query.php',
|
||||
'Kirby\\Http\\Remote' => $baseDir . '/src/Http/Remote.php',
|
||||
'Kirby\\Http\\Request' => $baseDir . '/src/Http/Request.php',
|
||||
'Kirby\\Http\\Request\\Auth' => $baseDir . '/src/Http/Request/Auth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\BasicAuth' => $baseDir . '/src/Http/Request/Auth/BasicAuth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\BearerAuth' => $baseDir . '/src/Http/Request/Auth/BearerAuth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\SessionAuth' => $baseDir . '/src/Http/Request/Auth/SessionAuth.php',
|
||||
'Kirby\\Http\\Request\\Body' => $baseDir . '/src/Http/Request/Body.php',
|
||||
'Kirby\\Http\\Request\\Data' => $baseDir . '/src/Http/Request/Data.php',
|
||||
'Kirby\\Http\\Request\\Files' => $baseDir . '/src/Http/Request/Files.php',
|
||||
'Kirby\\Http\\Request\\Query' => $baseDir . '/src/Http/Request/Query.php',
|
||||
'Kirby\\Http\\Response' => $baseDir . '/src/Http/Response.php',
|
||||
'Kirby\\Http\\Route' => $baseDir . '/src/Http/Route.php',
|
||||
'Kirby\\Http\\Router' => $baseDir . '/src/Http/Router.php',
|
||||
'Kirby\\Http\\Uri' => $baseDir . '/src/Http/Uri.php',
|
||||
'Kirby\\Http\\Url' => $baseDir . '/src/Http/Url.php',
|
||||
'Kirby\\Http\\Visitor' => $baseDir . '/src/Http/Visitor.php',
|
||||
'Kirby\\Image\\Camera' => $baseDir . '/src/Image/Camera.php',
|
||||
'Kirby\\Image\\Darkroom' => $baseDir . '/src/Image/Darkroom.php',
|
||||
'Kirby\\Image\\Darkroom\\GdLib' => $baseDir . '/src/Image/Darkroom/GdLib.php',
|
||||
'Kirby\\Image\\Darkroom\\ImageMagick' => $baseDir . '/src/Image/Darkroom/ImageMagick.php',
|
||||
'Kirby\\Image\\Dimensions' => $baseDir . '/src/Image/Dimensions.php',
|
||||
'Kirby\\Image\\Exif' => $baseDir . '/src/Image/Exif.php',
|
||||
'Kirby\\Image\\Focus' => $baseDir . '/src/Image/Focus.php',
|
||||
'Kirby\\Image\\Image' => $baseDir . '/src/Image/Image.php',
|
||||
'Kirby\\Image\\Location' => $baseDir . '/src/Image/Location.php',
|
||||
'Kirby\\Image\\QrCode' => $baseDir . '/src/Image/QrCode.php',
|
||||
'Kirby\\Option\\Option' => $baseDir . '/src/Option/Option.php',
|
||||
'Kirby\\Option\\Options' => $baseDir . '/src/Option/Options.php',
|
||||
'Kirby\\Option\\OptionsApi' => $baseDir . '/src/Option/OptionsApi.php',
|
||||
'Kirby\\Option\\OptionsProvider' => $baseDir . '/src/Option/OptionsProvider.php',
|
||||
'Kirby\\Option\\OptionsQuery' => $baseDir . '/src/Option/OptionsQuery.php',
|
||||
'Kirby\\Panel\\Assets' => $baseDir . '/src/Panel/Assets.php',
|
||||
'Kirby\\Panel\\ChangesDialog' => $baseDir . '/src/Panel/ChangesDialog.php',
|
||||
'Kirby\\Panel\\Dialog' => $baseDir . '/src/Panel/Dialog.php',
|
||||
'Kirby\\Panel\\Document' => $baseDir . '/src/Panel/Document.php',
|
||||
'Kirby\\Panel\\Drawer' => $baseDir . '/src/Panel/Drawer.php',
|
||||
'Kirby\\Panel\\Dropdown' => $baseDir . '/src/Panel/Dropdown.php',
|
||||
'Kirby\\Panel\\Field' => $baseDir . '/src/Panel/Field.php',
|
||||
'Kirby\\Panel\\File' => $baseDir . '/src/Panel/File.php',
|
||||
'Kirby\\Panel\\Home' => $baseDir . '/src/Panel/Home.php',
|
||||
'Kirby\\Panel\\Json' => $baseDir . '/src/Panel/Json.php',
|
||||
'Kirby\\Panel\\Lab\\Category' => $baseDir . '/src/Panel/Lab/Category.php',
|
||||
'Kirby\\Panel\\Lab\\Docs' => $baseDir . '/src/Panel/Lab/Docs.php',
|
||||
'Kirby\\Panel\\Lab\\Example' => $baseDir . '/src/Panel/Lab/Example.php',
|
||||
'Kirby\\Panel\\Lab\\Snippet' => $baseDir . '/src/Panel/Lab/Snippet.php',
|
||||
'Kirby\\Panel\\Lab\\Template' => $baseDir . '/src/Panel/Lab/Template.php',
|
||||
'Kirby\\Panel\\Menu' => $baseDir . '/src/Panel/Menu.php',
|
||||
'Kirby\\Panel\\Model' => $baseDir . '/src/Panel/Model.php',
|
||||
'Kirby\\Panel\\Page' => $baseDir . '/src/Panel/Page.php',
|
||||
'Kirby\\Panel\\PageCreateDialog' => $baseDir . '/src/Panel/PageCreateDialog.php',
|
||||
'Kirby\\Panel\\Panel' => $baseDir . '/src/Panel/Panel.php',
|
||||
'Kirby\\Panel\\Plugins' => $baseDir . '/src/Panel/Plugins.php',
|
||||
'Kirby\\Panel\\Redirect' => $baseDir . '/src/Panel/Redirect.php',
|
||||
'Kirby\\Panel\\Request' => $baseDir . '/src/Panel/Request.php',
|
||||
'Kirby\\Panel\\Search' => $baseDir . '/src/Panel/Search.php',
|
||||
'Kirby\\Panel\\Site' => $baseDir . '/src/Panel/Site.php',
|
||||
'Kirby\\Panel\\User' => $baseDir . '/src/Panel/User.php',
|
||||
'Kirby\\Panel\\UserTotpDisableDialog' => $baseDir . '/src/Panel/UserTotpDisableDialog.php',
|
||||
'Kirby\\Panel\\UserTotpEnableDialog' => $baseDir . '/src/Panel/UserTotpEnableDialog.php',
|
||||
'Kirby\\Panel\\View' => $baseDir . '/src/Panel/View.php',
|
||||
'Kirby\\Parsley\\Element' => $baseDir . '/src/Parsley/Element.php',
|
||||
'Kirby\\Parsley\\Inline' => $baseDir . '/src/Parsley/Inline.php',
|
||||
'Kirby\\Parsley\\Parsley' => $baseDir . '/src/Parsley/Parsley.php',
|
||||
'Kirby\\Parsley\\Schema' => $baseDir . '/src/Parsley/Schema.php',
|
||||
'Kirby\\Parsley\\Schema\\Blocks' => $baseDir . '/src/Parsley/Schema/Blocks.php',
|
||||
'Kirby\\Parsley\\Schema\\Plain' => $baseDir . '/src/Parsley/Schema/Plain.php',
|
||||
'Kirby\\Query\\Argument' => $baseDir . '/src/Query/Argument.php',
|
||||
'Kirby\\Query\\Arguments' => $baseDir . '/src/Query/Arguments.php',
|
||||
'Kirby\\Query\\Expression' => $baseDir . '/src/Query/Expression.php',
|
||||
'Kirby\\Query\\Query' => $baseDir . '/src/Query/Query.php',
|
||||
'Kirby\\Query\\Segment' => $baseDir . '/src/Query/Segment.php',
|
||||
'Kirby\\Query\\Segments' => $baseDir . '/src/Query/Segments.php',
|
||||
'Kirby\\Sane\\DomHandler' => $baseDir . '/src/Sane/DomHandler.php',
|
||||
'Kirby\\Sane\\Handler' => $baseDir . '/src/Sane/Handler.php',
|
||||
'Kirby\\Sane\\Html' => $baseDir . '/src/Sane/Html.php',
|
||||
'Kirby\\Sane\\Sane' => $baseDir . '/src/Sane/Sane.php',
|
||||
'Kirby\\Sane\\Svg' => $baseDir . '/src/Sane/Svg.php',
|
||||
'Kirby\\Sane\\Svgz' => $baseDir . '/src/Sane/Svgz.php',
|
||||
'Kirby\\Sane\\Xml' => $baseDir . '/src/Sane/Xml.php',
|
||||
'Kirby\\Session\\AutoSession' => $baseDir . '/src/Session/AutoSession.php',
|
||||
'Kirby\\Session\\FileSessionStore' => $baseDir . '/src/Session/FileSessionStore.php',
|
||||
'Kirby\\Session\\Session' => $baseDir . '/src/Session/Session.php',
|
||||
'Kirby\\Session\\SessionData' => $baseDir . '/src/Session/SessionData.php',
|
||||
'Kirby\\Session\\SessionStore' => $baseDir . '/src/Session/SessionStore.php',
|
||||
'Kirby\\Session\\Sessions' => $baseDir . '/src/Session/Sessions.php',
|
||||
'Kirby\\Template\\Slot' => $baseDir . '/src/Template/Slot.php',
|
||||
'Kirby\\Template\\Slots' => $baseDir . '/src/Template/Slots.php',
|
||||
'Kirby\\Template\\Snippet' => $baseDir . '/src/Template/Snippet.php',
|
||||
'Kirby\\Template\\Template' => $baseDir . '/src/Template/Template.php',
|
||||
'Kirby\\Text\\KirbyTag' => $baseDir . '/src/Text/KirbyTag.php',
|
||||
'Kirby\\Text\\KirbyTags' => $baseDir . '/src/Text/KirbyTags.php',
|
||||
'Kirby\\Text\\Markdown' => $baseDir . '/src/Text/Markdown.php',
|
||||
'Kirby\\Text\\SmartyPants' => $baseDir . '/src/Text/SmartyPants.php',
|
||||
'Kirby\\Toolkit\\A' => $baseDir . '/src/Toolkit/A.php',
|
||||
'Kirby\\Toolkit\\Collection' => $baseDir . '/src/Toolkit/Collection.php',
|
||||
'Kirby\\Toolkit\\Component' => $baseDir . '/src/Toolkit/Component.php',
|
||||
'Kirby\\Toolkit\\Config' => $baseDir . '/src/Toolkit/Config.php',
|
||||
'Kirby\\Toolkit\\Controller' => $baseDir . '/src/Toolkit/Controller.php',
|
||||
'Kirby\\Toolkit\\Date' => $baseDir . '/src/Toolkit/Date.php',
|
||||
'Kirby\\Toolkit\\Dom' => $baseDir . '/src/Toolkit/Dom.php',
|
||||
'Kirby\\Toolkit\\Escape' => $baseDir . '/src/Toolkit/Escape.php',
|
||||
'Kirby\\Toolkit\\Facade' => $baseDir . '/src/Toolkit/Facade.php',
|
||||
'Kirby\\Toolkit\\Html' => $baseDir . '/src/Toolkit/Html.php',
|
||||
'Kirby\\Toolkit\\I18n' => $baseDir . '/src/Toolkit/I18n.php',
|
||||
'Kirby\\Toolkit\\Iterator' => $baseDir . '/src/Toolkit/Iterator.php',
|
||||
'Kirby\\Toolkit\\LazyValue' => $baseDir . '/src/Toolkit/LazyValue.php',
|
||||
'Kirby\\Toolkit\\Locale' => $baseDir . '/src/Toolkit/Locale.php',
|
||||
'Kirby\\Toolkit\\Obj' => $baseDir . '/src/Toolkit/Obj.php',
|
||||
'Kirby\\Toolkit\\Pagination' => $baseDir . '/src/Toolkit/Pagination.php',
|
||||
'Kirby\\Toolkit\\Properties' => $baseDir . '/src/Toolkit/Properties.php',
|
||||
'Kirby\\Toolkit\\Silo' => $baseDir . '/src/Toolkit/Silo.php',
|
||||
'Kirby\\Toolkit\\Str' => $baseDir . '/src/Toolkit/Str.php',
|
||||
'Kirby\\Toolkit\\SymmetricCrypto' => $baseDir . '/src/Toolkit/SymmetricCrypto.php',
|
||||
'Kirby\\Toolkit\\Totp' => $baseDir . '/src/Toolkit/Totp.php',
|
||||
'Kirby\\Toolkit\\Tpl' => $baseDir . '/src/Toolkit/Tpl.php',
|
||||
'Kirby\\Toolkit\\V' => $baseDir . '/src/Toolkit/V.php',
|
||||
'Kirby\\Toolkit\\View' => $baseDir . '/src/Toolkit/View.php',
|
||||
'Kirby\\Toolkit\\Xml' => $baseDir . '/src/Toolkit/Xml.php',
|
||||
'Kirby\\Uuid\\BlockUuid' => $baseDir . '/src/Uuid/BlockUuid.php',
|
||||
'Kirby\\Uuid\\FieldUuid' => $baseDir . '/src/Uuid/FieldUuid.php',
|
||||
'Kirby\\Uuid\\FileUuid' => $baseDir . '/src/Uuid/FileUuid.php',
|
||||
'Kirby\\Uuid\\HasUuids' => $baseDir . '/src/Uuid/HasUuids.php',
|
||||
'Kirby\\Uuid\\Identifiable' => $baseDir . '/src/Uuid/Identifiable.php',
|
||||
'Kirby\\Uuid\\ModelUuid' => $baseDir . '/src/Uuid/ModelUuid.php',
|
||||
'Kirby\\Uuid\\PageUuid' => $baseDir . '/src/Uuid/PageUuid.php',
|
||||
'Kirby\\Uuid\\SiteUuid' => $baseDir . '/src/Uuid/SiteUuid.php',
|
||||
'Kirby\\Uuid\\StructureUuid' => $baseDir . '/src/Uuid/StructureUuid.php',
|
||||
'Kirby\\Uuid\\Uri' => $baseDir . '/src/Uuid/Uri.php',
|
||||
'Kirby\\Uuid\\UserUuid' => $baseDir . '/src/Uuid/UserUuid.php',
|
||||
'Kirby\\Uuid\\Uuid' => $baseDir . '/src/Uuid/Uuid.php',
|
||||
'Kirby\\Uuid\\Uuids' => $baseDir . '/src/Uuid/Uuids.php',
|
||||
'Laminas\\Escaper\\Escaper' => $vendorDir . '/laminas/laminas-escaper/src/Escaper.php',
|
||||
'Laminas\\Escaper\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-escaper/src/Exception/ExceptionInterface.php',
|
||||
'Laminas\\Escaper\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-escaper/src/Exception/InvalidArgumentException.php',
|
||||
'Laminas\\Escaper\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-escaper/src/Exception/RuntimeException.php',
|
||||
'League\\ColorExtractor\\Color' => $vendorDir . '/league/color-extractor/src/Color.php',
|
||||
'League\\ColorExtractor\\ColorExtractor' => $vendorDir . '/league/color-extractor/src/ColorExtractor.php',
|
||||
'League\\ColorExtractor\\Palette' => $vendorDir . '/league/color-extractor/src/Palette.php',
|
||||
'Michelf\\SmartyPants' => $vendorDir . '/michelf/php-smartypants/Michelf/SmartyPants.php',
|
||||
'Michelf\\SmartyPantsTypographer' => $vendorDir . '/michelf/php-smartypants/Michelf/SmartyPantsTypographer.php',
|
||||
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'PHPMailer\\PHPMailer\\DSNConfigurator' => $vendorDir . '/phpmailer/phpmailer/src/DSNConfigurator.php',
|
||||
'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php',
|
||||
'PHPMailer\\PHPMailer\\OAuth' => $vendorDir . '/phpmailer/phpmailer/src/OAuth.php',
|
||||
'PHPMailer\\PHPMailer\\OAuthTokenProvider' => $vendorDir . '/phpmailer/phpmailer/src/OAuthTokenProvider.php',
|
||||
'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php',
|
||||
'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php',
|
||||
'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php',
|
||||
'Parsedown' => $baseDir . '/dependencies/parsedown/Parsedown.php',
|
||||
'ParsedownExtra' => $baseDir . '/dependencies/parsedown-extra/ParsedownExtra.php',
|
||||
'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/src/AbstractLogger.php',
|
||||
'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/src/InvalidArgumentException.php',
|
||||
'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/src/LogLevel.php',
|
||||
'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/src/LoggerAwareInterface.php',
|
||||
'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/src/LoggerAwareTrait.php',
|
||||
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/src/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/src/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/src/NullLogger.php',
|
||||
'Spyc' => $baseDir . '/dependencies/spyc/Spyc.php',
|
||||
'Symfony\\Component\\Yaml\\Command\\LintCommand' => $vendorDir . '/symfony/yaml/Command/LintCommand.php',
|
||||
'Symfony\\Component\\Yaml\\Dumper' => $vendorDir . '/symfony/yaml/Dumper.php',
|
||||
'Symfony\\Component\\Yaml\\Escaper' => $vendorDir . '/symfony/yaml/Escaper.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\DumpException' => $vendorDir . '/symfony/yaml/Exception/DumpException.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/yaml/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\ParseException' => $vendorDir . '/symfony/yaml/Exception/ParseException.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => $vendorDir . '/symfony/yaml/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Yaml\\Inline' => $vendorDir . '/symfony/yaml/Inline.php',
|
||||
'Symfony\\Component\\Yaml\\Parser' => $vendorDir . '/symfony/yaml/Parser.php',
|
||||
'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => $vendorDir . '/symfony/yaml/Tag/TaggedValue.php',
|
||||
'Symfony\\Component\\Yaml\\Unescaper' => $vendorDir . '/symfony/yaml/Unescaper.php',
|
||||
'Symfony\\Component\\Yaml\\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
|
||||
'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php',
|
||||
'Whoops\\Exception\\Frame' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Frame.php',
|
||||
'Whoops\\Exception\\FrameCollection' => $vendorDir . '/filp/whoops/src/Whoops/Exception/FrameCollection.php',
|
||||
'Whoops\\Exception\\Inspector' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Inspector.php',
|
||||
'Whoops\\Handler\\CallbackHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/CallbackHandler.php',
|
||||
'Whoops\\Handler\\Handler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/Handler.php',
|
||||
'Whoops\\Handler\\HandlerInterface' => $vendorDir . '/filp/whoops/src/Whoops/Handler/HandlerInterface.php',
|
||||
'Whoops\\Handler\\JsonResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php',
|
||||
'Whoops\\Handler\\PlainTextHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php',
|
||||
'Whoops\\Handler\\PrettyPageHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php',
|
||||
'Whoops\\Handler\\XmlResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php',
|
||||
'Whoops\\Inspector\\InspectorFactory' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorFactory.php',
|
||||
'Whoops\\Inspector\\InspectorFactoryInterface' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorFactoryInterface.php',
|
||||
'Whoops\\Inspector\\InspectorInterface' => $vendorDir . '/filp/whoops/src/Whoops/Inspector/InspectorInterface.php',
|
||||
'Whoops\\Run' => $vendorDir . '/filp/whoops/src/Whoops/Run.php',
|
||||
'Whoops\\RunInterface' => $vendorDir . '/filp/whoops/src/Whoops/RunInterface.php',
|
||||
'Whoops\\Util\\HtmlDumperOutput' => $vendorDir . '/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php',
|
||||
'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.php',
|
||||
'Whoops\\Util\\SystemFacade' => $vendorDir . '/filp/whoops/src/Whoops/Util/SystemFacade.php',
|
||||
'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
|
||||
'claviska\\SimpleImage' => $vendorDir . '/claviska/simpleimage/src/claviska/SimpleImage.php',
|
||||
);
|
||||
16
public/kirby/vendor/composer/autoload_files.php
vendored
16
public/kirby/vendor/composer/autoload_files.php
vendored
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/config/setup.php',
|
||||
'87988fc7b1c1f093da22a1a3de972f3a' => $baseDir . '/config/helpers.php',
|
||||
);
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'claviska' => array($vendorDir . '/claviska/simpleimage/src'),
|
||||
'Michelf' => array($vendorDir . '/michelf/php-smartypants'),
|
||||
);
|
||||
22
public/kirby/vendor/composer/autoload_psr4.php
vendored
22
public/kirby/vendor/composer/autoload_psr4.php
vendored
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
|
||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
||||
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
|
||||
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
|
||||
'League\\ColorExtractor\\' => array($vendorDir . '/league/color-extractor/src'),
|
||||
'Laminas\\Escaper\\' => array($vendorDir . '/laminas/laminas-escaper/src'),
|
||||
'Kirby\\' => array($baseDir . '/src', $vendorDir . '/getkirby/composer-installer/src'),
|
||||
'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
|
||||
'Base32\\' => array($vendorDir . '/christian-riesen/base32/src'),
|
||||
);
|
||||
48
public/kirby/vendor/composer/autoload_real.php
vendored
48
public/kirby/vendor/composer/autoload_real.php
vendored
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit0bf5c8a9cfa251a218fc581ac888fe35
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Autoload\ClassLoader
|
||||
*/
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0bf5c8a9cfa251a218fc581ac888fe35', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0bf5c8a9cfa251a218fc581ac888fe35', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::getInitializer($loader));
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
require $file;
|
||||
}
|
||||
}, null, null);
|
||||
foreach ($filesToLoad as $fileIdentifier => $file) {
|
||||
$requireFile($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
547
public/kirby/vendor/composer/autoload_static.php
vendored
547
public/kirby/vendor/composer/autoload_static.php
vendored
|
|
@ -1,547 +0,0 @@
|
|||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35
|
||||
{
|
||||
public static $files = array (
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/config/setup.php',
|
||||
'87988fc7b1c1f093da22a1a3de972f3a' => __DIR__ . '/../..' . '/config/helpers.php',
|
||||
);
|
||||
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'W' =>
|
||||
array (
|
||||
'Whoops\\' => 7,
|
||||
),
|
||||
'S' =>
|
||||
array (
|
||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
|
||||
'Symfony\\Polyfill\\Ctype\\' => 23,
|
||||
'Symfony\\Component\\Yaml\\' => 23,
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
'Psr\\Log\\' => 8,
|
||||
'PHPMailer\\PHPMailer\\' => 20,
|
||||
),
|
||||
'L' =>
|
||||
array (
|
||||
'League\\ColorExtractor\\' => 22,
|
||||
'Laminas\\Escaper\\' => 16,
|
||||
),
|
||||
'K' =>
|
||||
array (
|
||||
'Kirby\\' => 6,
|
||||
),
|
||||
'C' =>
|
||||
array (
|
||||
'Composer\\Semver\\' => 16,
|
||||
),
|
||||
'B' =>
|
||||
array (
|
||||
'Base32\\' => 7,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'Whoops\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops',
|
||||
),
|
||||
'Symfony\\Polyfill\\Mbstring\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
|
||||
),
|
||||
'Symfony\\Polyfill\\Ctype\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
||||
),
|
||||
'Symfony\\Component\\Yaml\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/yaml',
|
||||
),
|
||||
'Psr\\Log\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/log/src',
|
||||
),
|
||||
'PHPMailer\\PHPMailer\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
|
||||
),
|
||||
'League\\ColorExtractor\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/color-extractor/src',
|
||||
),
|
||||
'Laminas\\Escaper\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/laminas/laminas-escaper/src',
|
||||
),
|
||||
'Kirby\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/src',
|
||||
1 => __DIR__ . '/..' . '/getkirby/composer-installer/src',
|
||||
),
|
||||
'Composer\\Semver\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/composer/semver/src',
|
||||
),
|
||||
'Base32\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/christian-riesen/base32/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixesPsr0 = array (
|
||||
'c' =>
|
||||
array (
|
||||
'claviska' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/claviska/simpleimage/src',
|
||||
),
|
||||
),
|
||||
'M' =>
|
||||
array (
|
||||
'Michelf' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/michelf/php-smartypants',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'Base32\\Base32' => __DIR__ . '/..' . '/christian-riesen/base32/src/Base32.php',
|
||||
'Base32\\Base32Hex' => __DIR__ . '/..' . '/christian-riesen/base32/src/Base32Hex.php',
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php',
|
||||
'Composer\\Semver\\CompilingMatcher' => __DIR__ . '/..' . '/composer/semver/src/CompilingMatcher.php',
|
||||
'Composer\\Semver\\Constraint\\Bound' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Bound.php',
|
||||
'Composer\\Semver\\Constraint\\Constraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Constraint.php',
|
||||
'Composer\\Semver\\Constraint\\ConstraintInterface' => __DIR__ . '/..' . '/composer/semver/src/Constraint/ConstraintInterface.php',
|
||||
'Composer\\Semver\\Constraint\\MatchAllConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchAllConstraint.php',
|
||||
'Composer\\Semver\\Constraint\\MatchNoneConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
|
||||
'Composer\\Semver\\Constraint\\MultiConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MultiConstraint.php',
|
||||
'Composer\\Semver\\Interval' => __DIR__ . '/..' . '/composer/semver/src/Interval.php',
|
||||
'Composer\\Semver\\Intervals' => __DIR__ . '/..' . '/composer/semver/src/Intervals.php',
|
||||
'Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php',
|
||||
'Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php',
|
||||
'Kirby\\Api\\Api' => __DIR__ . '/../..' . '/src/Api/Api.php',
|
||||
'Kirby\\Api\\Collection' => __DIR__ . '/../..' . '/src/Api/Collection.php',
|
||||
'Kirby\\Api\\Model' => __DIR__ . '/../..' . '/src/Api/Model.php',
|
||||
'Kirby\\Blueprint\\Collection' => __DIR__ . '/../..' . '/src/Blueprint/Collection.php',
|
||||
'Kirby\\Blueprint\\Config' => __DIR__ . '/../..' . '/src/Blueprint/Config.php',
|
||||
'Kirby\\Blueprint\\Extension' => __DIR__ . '/../..' . '/src/Blueprint/Extension.php',
|
||||
'Kirby\\Blueprint\\Factory' => __DIR__ . '/../..' . '/src/Blueprint/Factory.php',
|
||||
'Kirby\\Blueprint\\Node' => __DIR__ . '/../..' . '/src/Blueprint/Node.php',
|
||||
'Kirby\\Blueprint\\NodeI18n' => __DIR__ . '/../..' . '/src/Blueprint/NodeI18n.php',
|
||||
'Kirby\\Blueprint\\NodeIcon' => __DIR__ . '/../..' . '/src/Blueprint/NodeIcon.php',
|
||||
'Kirby\\Blueprint\\NodeProperty' => __DIR__ . '/../..' . '/src/Blueprint/NodeProperty.php',
|
||||
'Kirby\\Blueprint\\NodeString' => __DIR__ . '/../..' . '/src/Blueprint/NodeString.php',
|
||||
'Kirby\\Blueprint\\NodeText' => __DIR__ . '/../..' . '/src/Blueprint/NodeText.php',
|
||||
'Kirby\\Cache\\ApcuCache' => __DIR__ . '/../..' . '/src/Cache/ApcuCache.php',
|
||||
'Kirby\\Cache\\Cache' => __DIR__ . '/../..' . '/src/Cache/Cache.php',
|
||||
'Kirby\\Cache\\FileCache' => __DIR__ . '/../..' . '/src/Cache/FileCache.php',
|
||||
'Kirby\\Cache\\MemCached' => __DIR__ . '/../..' . '/src/Cache/MemCached.php',
|
||||
'Kirby\\Cache\\MemoryCache' => __DIR__ . '/../..' . '/src/Cache/MemoryCache.php',
|
||||
'Kirby\\Cache\\NullCache' => __DIR__ . '/../..' . '/src/Cache/NullCache.php',
|
||||
'Kirby\\Cache\\Value' => __DIR__ . '/../..' . '/src/Cache/Value.php',
|
||||
'Kirby\\Cms\\Api' => __DIR__ . '/../..' . '/src/Cms/Api.php',
|
||||
'Kirby\\Cms\\App' => __DIR__ . '/../..' . '/src/Cms/App.php',
|
||||
'Kirby\\Cms\\AppCaches' => __DIR__ . '/../..' . '/src/Cms/AppCaches.php',
|
||||
'Kirby\\Cms\\AppErrors' => __DIR__ . '/../..' . '/src/Cms/AppErrors.php',
|
||||
'Kirby\\Cms\\AppPlugins' => __DIR__ . '/../..' . '/src/Cms/AppPlugins.php',
|
||||
'Kirby\\Cms\\AppTranslations' => __DIR__ . '/../..' . '/src/Cms/AppTranslations.php',
|
||||
'Kirby\\Cms\\AppUsers' => __DIR__ . '/../..' . '/src/Cms/AppUsers.php',
|
||||
'Kirby\\Cms\\Auth' => __DIR__ . '/../..' . '/src/Cms/Auth.php',
|
||||
'Kirby\\Cms\\Auth\\Challenge' => __DIR__ . '/../..' . '/src/Cms/Auth/Challenge.php',
|
||||
'Kirby\\Cms\\Auth\\EmailChallenge' => __DIR__ . '/../..' . '/src/Cms/Auth/EmailChallenge.php',
|
||||
'Kirby\\Cms\\Auth\\Status' => __DIR__ . '/../..' . '/src/Cms/Auth/Status.php',
|
||||
'Kirby\\Cms\\Auth\\TotpChallenge' => __DIR__ . '/../..' . '/src/Cms/Auth/TotpChallenge.php',
|
||||
'Kirby\\Cms\\Block' => __DIR__ . '/../..' . '/src/Cms/Block.php',
|
||||
'Kirby\\Cms\\BlockConverter' => __DIR__ . '/../..' . '/src/Cms/BlockConverter.php',
|
||||
'Kirby\\Cms\\Blocks' => __DIR__ . '/../..' . '/src/Cms/Blocks.php',
|
||||
'Kirby\\Cms\\Blueprint' => __DIR__ . '/../..' . '/src/Cms/Blueprint.php',
|
||||
'Kirby\\Cms\\Collection' => __DIR__ . '/../..' . '/src/Cms/Collection.php',
|
||||
'Kirby\\Cms\\Collections' => __DIR__ . '/../..' . '/src/Cms/Collections.php',
|
||||
'Kirby\\Cms\\ContentLock' => __DIR__ . '/../..' . '/src/Cms/ContentLock.php',
|
||||
'Kirby\\Cms\\ContentLocks' => __DIR__ . '/../..' . '/src/Cms/ContentLocks.php',
|
||||
'Kirby\\Cms\\Core' => __DIR__ . '/../..' . '/src/Cms/Core.php',
|
||||
'Kirby\\Cms\\Email' => __DIR__ . '/../..' . '/src/Cms/Email.php',
|
||||
'Kirby\\Cms\\Event' => __DIR__ . '/../..' . '/src/Cms/Event.php',
|
||||
'Kirby\\Cms\\Fieldset' => __DIR__ . '/../..' . '/src/Cms/Fieldset.php',
|
||||
'Kirby\\Cms\\Fieldsets' => __DIR__ . '/../..' . '/src/Cms/Fieldsets.php',
|
||||
'Kirby\\Cms\\File' => __DIR__ . '/../..' . '/src/Cms/File.php',
|
||||
'Kirby\\Cms\\FileActions' => __DIR__ . '/../..' . '/src/Cms/FileActions.php',
|
||||
'Kirby\\Cms\\FileBlueprint' => __DIR__ . '/../..' . '/src/Cms/FileBlueprint.php',
|
||||
'Kirby\\Cms\\FileModifications' => __DIR__ . '/../..' . '/src/Cms/FileModifications.php',
|
||||
'Kirby\\Cms\\FilePermissions' => __DIR__ . '/../..' . '/src/Cms/FilePermissions.php',
|
||||
'Kirby\\Cms\\FilePicker' => __DIR__ . '/../..' . '/src/Cms/FilePicker.php',
|
||||
'Kirby\\Cms\\FileRules' => __DIR__ . '/../..' . '/src/Cms/FileRules.php',
|
||||
'Kirby\\Cms\\FileVersion' => __DIR__ . '/../..' . '/src/Cms/FileVersion.php',
|
||||
'Kirby\\Cms\\Files' => __DIR__ . '/../..' . '/src/Cms/Files.php',
|
||||
'Kirby\\Cms\\Find' => __DIR__ . '/../..' . '/src/Cms/Find.php',
|
||||
'Kirby\\Cms\\HasChildren' => __DIR__ . '/../..' . '/src/Cms/HasChildren.php',
|
||||
'Kirby\\Cms\\HasFiles' => __DIR__ . '/../..' . '/src/Cms/HasFiles.php',
|
||||
'Kirby\\Cms\\HasMethods' => __DIR__ . '/../..' . '/src/Cms/HasMethods.php',
|
||||
'Kirby\\Cms\\HasSiblings' => __DIR__ . '/../..' . '/src/Cms/HasSiblings.php',
|
||||
'Kirby\\Cms\\Helpers' => __DIR__ . '/../..' . '/src/Cms/Helpers.php',
|
||||
'Kirby\\Cms\\Html' => __DIR__ . '/../..' . '/src/Cms/Html.php',
|
||||
'Kirby\\Cms\\Ingredients' => __DIR__ . '/../..' . '/src/Cms/Ingredients.php',
|
||||
'Kirby\\Cms\\Item' => __DIR__ . '/../..' . '/src/Cms/Item.php',
|
||||
'Kirby\\Cms\\Items' => __DIR__ . '/../..' . '/src/Cms/Items.php',
|
||||
'Kirby\\Cms\\Language' => __DIR__ . '/../..' . '/src/Cms/Language.php',
|
||||
'Kirby\\Cms\\LanguageRouter' => __DIR__ . '/../..' . '/src/Cms/LanguageRouter.php',
|
||||
'Kirby\\Cms\\LanguageRoutes' => __DIR__ . '/../..' . '/src/Cms/LanguageRoutes.php',
|
||||
'Kirby\\Cms\\LanguageRules' => __DIR__ . '/../..' . '/src/Cms/LanguageRules.php',
|
||||
'Kirby\\Cms\\LanguageVariable' => __DIR__ . '/../..' . '/src/Cms/LanguageVariable.php',
|
||||
'Kirby\\Cms\\Languages' => __DIR__ . '/../..' . '/src/Cms/Languages.php',
|
||||
'Kirby\\Cms\\Layout' => __DIR__ . '/../..' . '/src/Cms/Layout.php',
|
||||
'Kirby\\Cms\\LayoutColumn' => __DIR__ . '/../..' . '/src/Cms/LayoutColumn.php',
|
||||
'Kirby\\Cms\\LayoutColumns' => __DIR__ . '/../..' . '/src/Cms/LayoutColumns.php',
|
||||
'Kirby\\Cms\\Layouts' => __DIR__ . '/../..' . '/src/Cms/Layouts.php',
|
||||
'Kirby\\Cms\\License' => __DIR__ . '/../..' . '/src/Cms/License.php',
|
||||
'Kirby\\Cms\\LicenseStatus' => __DIR__ . '/../..' . '/src/Cms/LicenseStatus.php',
|
||||
'Kirby\\Cms\\LicenseType' => __DIR__ . '/../..' . '/src/Cms/LicenseType.php',
|
||||
'Kirby\\Cms\\Loader' => __DIR__ . '/../..' . '/src/Cms/Loader.php',
|
||||
'Kirby\\Cms\\Media' => __DIR__ . '/../..' . '/src/Cms/Media.php',
|
||||
'Kirby\\Cms\\Model' => __DIR__ . '/../..' . '/src/Cms/Model.php',
|
||||
'Kirby\\Cms\\ModelPermissions' => __DIR__ . '/../..' . '/src/Cms/ModelPermissions.php',
|
||||
'Kirby\\Cms\\ModelWithContent' => __DIR__ . '/../..' . '/src/Cms/ModelWithContent.php',
|
||||
'Kirby\\Cms\\Nest' => __DIR__ . '/../..' . '/src/Cms/Nest.php',
|
||||
'Kirby\\Cms\\NestCollection' => __DIR__ . '/../..' . '/src/Cms/NestCollection.php',
|
||||
'Kirby\\Cms\\NestObject' => __DIR__ . '/../..' . '/src/Cms/NestObject.php',
|
||||
'Kirby\\Cms\\Page' => __DIR__ . '/../..' . '/src/Cms/Page.php',
|
||||
'Kirby\\Cms\\PageActions' => __DIR__ . '/../..' . '/src/Cms/PageActions.php',
|
||||
'Kirby\\Cms\\PageBlueprint' => __DIR__ . '/../..' . '/src/Cms/PageBlueprint.php',
|
||||
'Kirby\\Cms\\PagePermissions' => __DIR__ . '/../..' . '/src/Cms/PagePermissions.php',
|
||||
'Kirby\\Cms\\PagePicker' => __DIR__ . '/../..' . '/src/Cms/PagePicker.php',
|
||||
'Kirby\\Cms\\PageRules' => __DIR__ . '/../..' . '/src/Cms/PageRules.php',
|
||||
'Kirby\\Cms\\PageSiblings' => __DIR__ . '/../..' . '/src/Cms/PageSiblings.php',
|
||||
'Kirby\\Cms\\Pages' => __DIR__ . '/../..' . '/src/Cms/Pages.php',
|
||||
'Kirby\\Cms\\Pagination' => __DIR__ . '/../..' . '/src/Cms/Pagination.php',
|
||||
'Kirby\\Cms\\Permissions' => __DIR__ . '/../..' . '/src/Cms/Permissions.php',
|
||||
'Kirby\\Cms\\Picker' => __DIR__ . '/../..' . '/src/Cms/Picker.php',
|
||||
'Kirby\\Cms\\Plugin' => __DIR__ . '/../..' . '/src/Cms/Plugin.php',
|
||||
'Kirby\\Cms\\PluginAsset' => __DIR__ . '/../..' . '/src/Cms/PluginAsset.php',
|
||||
'Kirby\\Cms\\PluginAssets' => __DIR__ . '/../..' . '/src/Cms/PluginAssets.php',
|
||||
'Kirby\\Cms\\R' => __DIR__ . '/../..' . '/src/Cms/R.php',
|
||||
'Kirby\\Cms\\Responder' => __DIR__ . '/../..' . '/src/Cms/Responder.php',
|
||||
'Kirby\\Cms\\Response' => __DIR__ . '/../..' . '/src/Cms/Response.php',
|
||||
'Kirby\\Cms\\Role' => __DIR__ . '/../..' . '/src/Cms/Role.php',
|
||||
'Kirby\\Cms\\Roles' => __DIR__ . '/../..' . '/src/Cms/Roles.php',
|
||||
'Kirby\\Cms\\S' => __DIR__ . '/../..' . '/src/Cms/S.php',
|
||||
'Kirby\\Cms\\Search' => __DIR__ . '/../..' . '/src/Cms/Search.php',
|
||||
'Kirby\\Cms\\Section' => __DIR__ . '/../..' . '/src/Cms/Section.php',
|
||||
'Kirby\\Cms\\Site' => __DIR__ . '/../..' . '/src/Cms/Site.php',
|
||||
'Kirby\\Cms\\SiteActions' => __DIR__ . '/../..' . '/src/Cms/SiteActions.php',
|
||||
'Kirby\\Cms\\SiteBlueprint' => __DIR__ . '/../..' . '/src/Cms/SiteBlueprint.php',
|
||||
'Kirby\\Cms\\SitePermissions' => __DIR__ . '/../..' . '/src/Cms/SitePermissions.php',
|
||||
'Kirby\\Cms\\SiteRules' => __DIR__ . '/../..' . '/src/Cms/SiteRules.php',
|
||||
'Kirby\\Cms\\Structure' => __DIR__ . '/../..' . '/src/Cms/Structure.php',
|
||||
'Kirby\\Cms\\StructureObject' => __DIR__ . '/../..' . '/src/Cms/StructureObject.php',
|
||||
'Kirby\\Cms\\System' => __DIR__ . '/../..' . '/src/Cms/System.php',
|
||||
'Kirby\\Cms\\System\\UpdateStatus' => __DIR__ . '/../..' . '/src/Cms/System/UpdateStatus.php',
|
||||
'Kirby\\Cms\\Translation' => __DIR__ . '/../..' . '/src/Cms/Translation.php',
|
||||
'Kirby\\Cms\\Translations' => __DIR__ . '/../..' . '/src/Cms/Translations.php',
|
||||
'Kirby\\Cms\\Url' => __DIR__ . '/../..' . '/src/Cms/Url.php',
|
||||
'Kirby\\Cms\\User' => __DIR__ . '/../..' . '/src/Cms/User.php',
|
||||
'Kirby\\Cms\\UserActions' => __DIR__ . '/../..' . '/src/Cms/UserActions.php',
|
||||
'Kirby\\Cms\\UserBlueprint' => __DIR__ . '/../..' . '/src/Cms/UserBlueprint.php',
|
||||
'Kirby\\Cms\\UserPermissions' => __DIR__ . '/../..' . '/src/Cms/UserPermissions.php',
|
||||
'Kirby\\Cms\\UserPicker' => __DIR__ . '/../..' . '/src/Cms/UserPicker.php',
|
||||
'Kirby\\Cms\\UserRules' => __DIR__ . '/../..' . '/src/Cms/UserRules.php',
|
||||
'Kirby\\Cms\\Users' => __DIR__ . '/../..' . '/src/Cms/Users.php',
|
||||
'Kirby\\Cms\\Visitor' => __DIR__ . '/../..' . '/src/Cms/Visitor.php',
|
||||
'Kirby\\ComposerInstaller\\CmsInstaller' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/CmsInstaller.php',
|
||||
'Kirby\\ComposerInstaller\\Installer' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/Installer.php',
|
||||
'Kirby\\ComposerInstaller\\Plugin' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/Plugin.php',
|
||||
'Kirby\\ComposerInstaller\\PluginInstaller' => __DIR__ . '/..' . '/getkirby/composer-installer/src/ComposerInstaller/PluginInstaller.php',
|
||||
'Kirby\\Content\\Content' => __DIR__ . '/../..' . '/src/Content/Content.php',
|
||||
'Kirby\\Content\\ContentStorage' => __DIR__ . '/../..' . '/src/Content/ContentStorage.php',
|
||||
'Kirby\\Content\\ContentStorageHandler' => __DIR__ . '/../..' . '/src/Content/ContentStorageHandler.php',
|
||||
'Kirby\\Content\\ContentTranslation' => __DIR__ . '/../..' . '/src/Content/ContentTranslation.php',
|
||||
'Kirby\\Content\\Field' => __DIR__ . '/../..' . '/src/Content/Field.php',
|
||||
'Kirby\\Content\\PlainTextContentStorageHandler' => __DIR__ . '/../..' . '/src/Content/PlainTextContentStorageHandler.php',
|
||||
'Kirby\\Data\\Data' => __DIR__ . '/../..' . '/src/Data/Data.php',
|
||||
'Kirby\\Data\\Handler' => __DIR__ . '/../..' . '/src/Data/Handler.php',
|
||||
'Kirby\\Data\\Json' => __DIR__ . '/../..' . '/src/Data/Json.php',
|
||||
'Kirby\\Data\\PHP' => __DIR__ . '/../..' . '/src/Data/PHP.php',
|
||||
'Kirby\\Data\\Txt' => __DIR__ . '/../..' . '/src/Data/Txt.php',
|
||||
'Kirby\\Data\\Xml' => __DIR__ . '/../..' . '/src/Data/Xml.php',
|
||||
'Kirby\\Data\\Yaml' => __DIR__ . '/../..' . '/src/Data/Yaml.php',
|
||||
'Kirby\\Data\\YamlSpyc' => __DIR__ . '/../..' . '/src/Data/YamlSpyc.php',
|
||||
'Kirby\\Data\\YamlSymfony' => __DIR__ . '/../..' . '/src/Data/YamlSymfony.php',
|
||||
'Kirby\\Database\\Database' => __DIR__ . '/../..' . '/src/Database/Database.php',
|
||||
'Kirby\\Database\\Db' => __DIR__ . '/../..' . '/src/Database/Db.php',
|
||||
'Kirby\\Database\\Query' => __DIR__ . '/../..' . '/src/Database/Query.php',
|
||||
'Kirby\\Database\\Sql' => __DIR__ . '/../..' . '/src/Database/Sql.php',
|
||||
'Kirby\\Database\\Sql\\Mysql' => __DIR__ . '/../..' . '/src/Database/Sql/Mysql.php',
|
||||
'Kirby\\Database\\Sql\\Sqlite' => __DIR__ . '/../..' . '/src/Database/Sql/Sqlite.php',
|
||||
'Kirby\\Email\\Body' => __DIR__ . '/../..' . '/src/Email/Body.php',
|
||||
'Kirby\\Email\\Email' => __DIR__ . '/../..' . '/src/Email/Email.php',
|
||||
'Kirby\\Email\\PHPMailer' => __DIR__ . '/../..' . '/src/Email/PHPMailer.php',
|
||||
'Kirby\\Exception\\AuthException' => __DIR__ . '/../..' . '/src/Exception/AuthException.php',
|
||||
'Kirby\\Exception\\BadMethodCallException' => __DIR__ . '/../..' . '/src/Exception/BadMethodCallException.php',
|
||||
'Kirby\\Exception\\DuplicateException' => __DIR__ . '/../..' . '/src/Exception/DuplicateException.php',
|
||||
'Kirby\\Exception\\ErrorPageException' => __DIR__ . '/../..' . '/src/Exception/ErrorPageException.php',
|
||||
'Kirby\\Exception\\Exception' => __DIR__ . '/../..' . '/src/Exception/Exception.php',
|
||||
'Kirby\\Exception\\InvalidArgumentException' => __DIR__ . '/../..' . '/src/Exception/InvalidArgumentException.php',
|
||||
'Kirby\\Exception\\LogicException' => __DIR__ . '/../..' . '/src/Exception/LogicException.php',
|
||||
'Kirby\\Exception\\NotFoundException' => __DIR__ . '/../..' . '/src/Exception/NotFoundException.php',
|
||||
'Kirby\\Exception\\PermissionException' => __DIR__ . '/../..' . '/src/Exception/PermissionException.php',
|
||||
'Kirby\\Field\\FieldOptions' => __DIR__ . '/../..' . '/src/Field/FieldOptions.php',
|
||||
'Kirby\\Filesystem\\Asset' => __DIR__ . '/../..' . '/src/Filesystem/Asset.php',
|
||||
'Kirby\\Filesystem\\Dir' => __DIR__ . '/../..' . '/src/Filesystem/Dir.php',
|
||||
'Kirby\\Filesystem\\F' => __DIR__ . '/../..' . '/src/Filesystem/F.php',
|
||||
'Kirby\\Filesystem\\File' => __DIR__ . '/../..' . '/src/Filesystem/File.php',
|
||||
'Kirby\\Filesystem\\Filename' => __DIR__ . '/../..' . '/src/Filesystem/Filename.php',
|
||||
'Kirby\\Filesystem\\IsFile' => __DIR__ . '/../..' . '/src/Filesystem/IsFile.php',
|
||||
'Kirby\\Filesystem\\Mime' => __DIR__ . '/../..' . '/src/Filesystem/Mime.php',
|
||||
'Kirby\\Form\\Field' => __DIR__ . '/../..' . '/src/Form/Field.php',
|
||||
'Kirby\\Form\\FieldClass' => __DIR__ . '/../..' . '/src/Form/FieldClass.php',
|
||||
'Kirby\\Form\\Field\\BlocksField' => __DIR__ . '/../..' . '/src/Form/Field/BlocksField.php',
|
||||
'Kirby\\Form\\Field\\LayoutField' => __DIR__ . '/../..' . '/src/Form/Field/LayoutField.php',
|
||||
'Kirby\\Form\\Fields' => __DIR__ . '/../..' . '/src/Form/Fields.php',
|
||||
'Kirby\\Form\\Form' => __DIR__ . '/../..' . '/src/Form/Form.php',
|
||||
'Kirby\\Form\\Mixin\\EmptyState' => __DIR__ . '/../..' . '/src/Form/Mixin/EmptyState.php',
|
||||
'Kirby\\Form\\Mixin\\Max' => __DIR__ . '/../..' . '/src/Form/Mixin/Max.php',
|
||||
'Kirby\\Form\\Mixin\\Min' => __DIR__ . '/../..' . '/src/Form/Mixin/Min.php',
|
||||
'Kirby\\Form\\Validations' => __DIR__ . '/../..' . '/src/Form/Validations.php',
|
||||
'Kirby\\Http\\Cookie' => __DIR__ . '/../..' . '/src/Http/Cookie.php',
|
||||
'Kirby\\Http\\Environment' => __DIR__ . '/../..' . '/src/Http/Environment.php',
|
||||
'Kirby\\Http\\Exceptions\\NextRouteException' => __DIR__ . '/../..' . '/src/Http/Exceptions/NextRouteException.php',
|
||||
'Kirby\\Http\\Header' => __DIR__ . '/../..' . '/src/Http/Header.php',
|
||||
'Kirby\\Http\\Idn' => __DIR__ . '/../..' . '/src/Http/Idn.php',
|
||||
'Kirby\\Http\\Params' => __DIR__ . '/../..' . '/src/Http/Params.php',
|
||||
'Kirby\\Http\\Path' => __DIR__ . '/../..' . '/src/Http/Path.php',
|
||||
'Kirby\\Http\\Query' => __DIR__ . '/../..' . '/src/Http/Query.php',
|
||||
'Kirby\\Http\\Remote' => __DIR__ . '/../..' . '/src/Http/Remote.php',
|
||||
'Kirby\\Http\\Request' => __DIR__ . '/../..' . '/src/Http/Request.php',
|
||||
'Kirby\\Http\\Request\\Auth' => __DIR__ . '/../..' . '/src/Http/Request/Auth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\BasicAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/BasicAuth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\BearerAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/BearerAuth.php',
|
||||
'Kirby\\Http\\Request\\Auth\\SessionAuth' => __DIR__ . '/../..' . '/src/Http/Request/Auth/SessionAuth.php',
|
||||
'Kirby\\Http\\Request\\Body' => __DIR__ . '/../..' . '/src/Http/Request/Body.php',
|
||||
'Kirby\\Http\\Request\\Data' => __DIR__ . '/../..' . '/src/Http/Request/Data.php',
|
||||
'Kirby\\Http\\Request\\Files' => __DIR__ . '/../..' . '/src/Http/Request/Files.php',
|
||||
'Kirby\\Http\\Request\\Query' => __DIR__ . '/../..' . '/src/Http/Request/Query.php',
|
||||
'Kirby\\Http\\Response' => __DIR__ . '/../..' . '/src/Http/Response.php',
|
||||
'Kirby\\Http\\Route' => __DIR__ . '/../..' . '/src/Http/Route.php',
|
||||
'Kirby\\Http\\Router' => __DIR__ . '/../..' . '/src/Http/Router.php',
|
||||
'Kirby\\Http\\Uri' => __DIR__ . '/../..' . '/src/Http/Uri.php',
|
||||
'Kirby\\Http\\Url' => __DIR__ . '/../..' . '/src/Http/Url.php',
|
||||
'Kirby\\Http\\Visitor' => __DIR__ . '/../..' . '/src/Http/Visitor.php',
|
||||
'Kirby\\Image\\Camera' => __DIR__ . '/../..' . '/src/Image/Camera.php',
|
||||
'Kirby\\Image\\Darkroom' => __DIR__ . '/../..' . '/src/Image/Darkroom.php',
|
||||
'Kirby\\Image\\Darkroom\\GdLib' => __DIR__ . '/../..' . '/src/Image/Darkroom/GdLib.php',
|
||||
'Kirby\\Image\\Darkroom\\ImageMagick' => __DIR__ . '/../..' . '/src/Image/Darkroom/ImageMagick.php',
|
||||
'Kirby\\Image\\Dimensions' => __DIR__ . '/../..' . '/src/Image/Dimensions.php',
|
||||
'Kirby\\Image\\Exif' => __DIR__ . '/../..' . '/src/Image/Exif.php',
|
||||
'Kirby\\Image\\Focus' => __DIR__ . '/../..' . '/src/Image/Focus.php',
|
||||
'Kirby\\Image\\Image' => __DIR__ . '/../..' . '/src/Image/Image.php',
|
||||
'Kirby\\Image\\Location' => __DIR__ . '/../..' . '/src/Image/Location.php',
|
||||
'Kirby\\Image\\QrCode' => __DIR__ . '/../..' . '/src/Image/QrCode.php',
|
||||
'Kirby\\Option\\Option' => __DIR__ . '/../..' . '/src/Option/Option.php',
|
||||
'Kirby\\Option\\Options' => __DIR__ . '/../..' . '/src/Option/Options.php',
|
||||
'Kirby\\Option\\OptionsApi' => __DIR__ . '/../..' . '/src/Option/OptionsApi.php',
|
||||
'Kirby\\Option\\OptionsProvider' => __DIR__ . '/../..' . '/src/Option/OptionsProvider.php',
|
||||
'Kirby\\Option\\OptionsQuery' => __DIR__ . '/../..' . '/src/Option/OptionsQuery.php',
|
||||
'Kirby\\Panel\\Assets' => __DIR__ . '/../..' . '/src/Panel/Assets.php',
|
||||
'Kirby\\Panel\\ChangesDialog' => __DIR__ . '/../..' . '/src/Panel/ChangesDialog.php',
|
||||
'Kirby\\Panel\\Dialog' => __DIR__ . '/../..' . '/src/Panel/Dialog.php',
|
||||
'Kirby\\Panel\\Document' => __DIR__ . '/../..' . '/src/Panel/Document.php',
|
||||
'Kirby\\Panel\\Drawer' => __DIR__ . '/../..' . '/src/Panel/Drawer.php',
|
||||
'Kirby\\Panel\\Dropdown' => __DIR__ . '/../..' . '/src/Panel/Dropdown.php',
|
||||
'Kirby\\Panel\\Field' => __DIR__ . '/../..' . '/src/Panel/Field.php',
|
||||
'Kirby\\Panel\\File' => __DIR__ . '/../..' . '/src/Panel/File.php',
|
||||
'Kirby\\Panel\\Home' => __DIR__ . '/../..' . '/src/Panel/Home.php',
|
||||
'Kirby\\Panel\\Json' => __DIR__ . '/../..' . '/src/Panel/Json.php',
|
||||
'Kirby\\Panel\\Lab\\Category' => __DIR__ . '/../..' . '/src/Panel/Lab/Category.php',
|
||||
'Kirby\\Panel\\Lab\\Docs' => __DIR__ . '/../..' . '/src/Panel/Lab/Docs.php',
|
||||
'Kirby\\Panel\\Lab\\Example' => __DIR__ . '/../..' . '/src/Panel/Lab/Example.php',
|
||||
'Kirby\\Panel\\Lab\\Snippet' => __DIR__ . '/../..' . '/src/Panel/Lab/Snippet.php',
|
||||
'Kirby\\Panel\\Lab\\Template' => __DIR__ . '/../..' . '/src/Panel/Lab/Template.php',
|
||||
'Kirby\\Panel\\Menu' => __DIR__ . '/../..' . '/src/Panel/Menu.php',
|
||||
'Kirby\\Panel\\Model' => __DIR__ . '/../..' . '/src/Panel/Model.php',
|
||||
'Kirby\\Panel\\Page' => __DIR__ . '/../..' . '/src/Panel/Page.php',
|
||||
'Kirby\\Panel\\PageCreateDialog' => __DIR__ . '/../..' . '/src/Panel/PageCreateDialog.php',
|
||||
'Kirby\\Panel\\Panel' => __DIR__ . '/../..' . '/src/Panel/Panel.php',
|
||||
'Kirby\\Panel\\Plugins' => __DIR__ . '/../..' . '/src/Panel/Plugins.php',
|
||||
'Kirby\\Panel\\Redirect' => __DIR__ . '/../..' . '/src/Panel/Redirect.php',
|
||||
'Kirby\\Panel\\Request' => __DIR__ . '/../..' . '/src/Panel/Request.php',
|
||||
'Kirby\\Panel\\Search' => __DIR__ . '/../..' . '/src/Panel/Search.php',
|
||||
'Kirby\\Panel\\Site' => __DIR__ . '/../..' . '/src/Panel/Site.php',
|
||||
'Kirby\\Panel\\User' => __DIR__ . '/../..' . '/src/Panel/User.php',
|
||||
'Kirby\\Panel\\UserTotpDisableDialog' => __DIR__ . '/../..' . '/src/Panel/UserTotpDisableDialog.php',
|
||||
'Kirby\\Panel\\UserTotpEnableDialog' => __DIR__ . '/../..' . '/src/Panel/UserTotpEnableDialog.php',
|
||||
'Kirby\\Panel\\View' => __DIR__ . '/../..' . '/src/Panel/View.php',
|
||||
'Kirby\\Parsley\\Element' => __DIR__ . '/../..' . '/src/Parsley/Element.php',
|
||||
'Kirby\\Parsley\\Inline' => __DIR__ . '/../..' . '/src/Parsley/Inline.php',
|
||||
'Kirby\\Parsley\\Parsley' => __DIR__ . '/../..' . '/src/Parsley/Parsley.php',
|
||||
'Kirby\\Parsley\\Schema' => __DIR__ . '/../..' . '/src/Parsley/Schema.php',
|
||||
'Kirby\\Parsley\\Schema\\Blocks' => __DIR__ . '/../..' . '/src/Parsley/Schema/Blocks.php',
|
||||
'Kirby\\Parsley\\Schema\\Plain' => __DIR__ . '/../..' . '/src/Parsley/Schema/Plain.php',
|
||||
'Kirby\\Query\\Argument' => __DIR__ . '/../..' . '/src/Query/Argument.php',
|
||||
'Kirby\\Query\\Arguments' => __DIR__ . '/../..' . '/src/Query/Arguments.php',
|
||||
'Kirby\\Query\\Expression' => __DIR__ . '/../..' . '/src/Query/Expression.php',
|
||||
'Kirby\\Query\\Query' => __DIR__ . '/../..' . '/src/Query/Query.php',
|
||||
'Kirby\\Query\\Segment' => __DIR__ . '/../..' . '/src/Query/Segment.php',
|
||||
'Kirby\\Query\\Segments' => __DIR__ . '/../..' . '/src/Query/Segments.php',
|
||||
'Kirby\\Sane\\DomHandler' => __DIR__ . '/../..' . '/src/Sane/DomHandler.php',
|
||||
'Kirby\\Sane\\Handler' => __DIR__ . '/../..' . '/src/Sane/Handler.php',
|
||||
'Kirby\\Sane\\Html' => __DIR__ . '/../..' . '/src/Sane/Html.php',
|
||||
'Kirby\\Sane\\Sane' => __DIR__ . '/../..' . '/src/Sane/Sane.php',
|
||||
'Kirby\\Sane\\Svg' => __DIR__ . '/../..' . '/src/Sane/Svg.php',
|
||||
'Kirby\\Sane\\Svgz' => __DIR__ . '/../..' . '/src/Sane/Svgz.php',
|
||||
'Kirby\\Sane\\Xml' => __DIR__ . '/../..' . '/src/Sane/Xml.php',
|
||||
'Kirby\\Session\\AutoSession' => __DIR__ . '/../..' . '/src/Session/AutoSession.php',
|
||||
'Kirby\\Session\\FileSessionStore' => __DIR__ . '/../..' . '/src/Session/FileSessionStore.php',
|
||||
'Kirby\\Session\\Session' => __DIR__ . '/../..' . '/src/Session/Session.php',
|
||||
'Kirby\\Session\\SessionData' => __DIR__ . '/../..' . '/src/Session/SessionData.php',
|
||||
'Kirby\\Session\\SessionStore' => __DIR__ . '/../..' . '/src/Session/SessionStore.php',
|
||||
'Kirby\\Session\\Sessions' => __DIR__ . '/../..' . '/src/Session/Sessions.php',
|
||||
'Kirby\\Template\\Slot' => __DIR__ . '/../..' . '/src/Template/Slot.php',
|
||||
'Kirby\\Template\\Slots' => __DIR__ . '/../..' . '/src/Template/Slots.php',
|
||||
'Kirby\\Template\\Snippet' => __DIR__ . '/../..' . '/src/Template/Snippet.php',
|
||||
'Kirby\\Template\\Template' => __DIR__ . '/../..' . '/src/Template/Template.php',
|
||||
'Kirby\\Text\\KirbyTag' => __DIR__ . '/../..' . '/src/Text/KirbyTag.php',
|
||||
'Kirby\\Text\\KirbyTags' => __DIR__ . '/../..' . '/src/Text/KirbyTags.php',
|
||||
'Kirby\\Text\\Markdown' => __DIR__ . '/../..' . '/src/Text/Markdown.php',
|
||||
'Kirby\\Text\\SmartyPants' => __DIR__ . '/../..' . '/src/Text/SmartyPants.php',
|
||||
'Kirby\\Toolkit\\A' => __DIR__ . '/../..' . '/src/Toolkit/A.php',
|
||||
'Kirby\\Toolkit\\Collection' => __DIR__ . '/../..' . '/src/Toolkit/Collection.php',
|
||||
'Kirby\\Toolkit\\Component' => __DIR__ . '/../..' . '/src/Toolkit/Component.php',
|
||||
'Kirby\\Toolkit\\Config' => __DIR__ . '/../..' . '/src/Toolkit/Config.php',
|
||||
'Kirby\\Toolkit\\Controller' => __DIR__ . '/../..' . '/src/Toolkit/Controller.php',
|
||||
'Kirby\\Toolkit\\Date' => __DIR__ . '/../..' . '/src/Toolkit/Date.php',
|
||||
'Kirby\\Toolkit\\Dom' => __DIR__ . '/../..' . '/src/Toolkit/Dom.php',
|
||||
'Kirby\\Toolkit\\Escape' => __DIR__ . '/../..' . '/src/Toolkit/Escape.php',
|
||||
'Kirby\\Toolkit\\Facade' => __DIR__ . '/../..' . '/src/Toolkit/Facade.php',
|
||||
'Kirby\\Toolkit\\Html' => __DIR__ . '/../..' . '/src/Toolkit/Html.php',
|
||||
'Kirby\\Toolkit\\I18n' => __DIR__ . '/../..' . '/src/Toolkit/I18n.php',
|
||||
'Kirby\\Toolkit\\Iterator' => __DIR__ . '/../..' . '/src/Toolkit/Iterator.php',
|
||||
'Kirby\\Toolkit\\LazyValue' => __DIR__ . '/../..' . '/src/Toolkit/LazyValue.php',
|
||||
'Kirby\\Toolkit\\Locale' => __DIR__ . '/../..' . '/src/Toolkit/Locale.php',
|
||||
'Kirby\\Toolkit\\Obj' => __DIR__ . '/../..' . '/src/Toolkit/Obj.php',
|
||||
'Kirby\\Toolkit\\Pagination' => __DIR__ . '/../..' . '/src/Toolkit/Pagination.php',
|
||||
'Kirby\\Toolkit\\Properties' => __DIR__ . '/../..' . '/src/Toolkit/Properties.php',
|
||||
'Kirby\\Toolkit\\Silo' => __DIR__ . '/../..' . '/src/Toolkit/Silo.php',
|
||||
'Kirby\\Toolkit\\Str' => __DIR__ . '/../..' . '/src/Toolkit/Str.php',
|
||||
'Kirby\\Toolkit\\SymmetricCrypto' => __DIR__ . '/../..' . '/src/Toolkit/SymmetricCrypto.php',
|
||||
'Kirby\\Toolkit\\Totp' => __DIR__ . '/../..' . '/src/Toolkit/Totp.php',
|
||||
'Kirby\\Toolkit\\Tpl' => __DIR__ . '/../..' . '/src/Toolkit/Tpl.php',
|
||||
'Kirby\\Toolkit\\V' => __DIR__ . '/../..' . '/src/Toolkit/V.php',
|
||||
'Kirby\\Toolkit\\View' => __DIR__ . '/../..' . '/src/Toolkit/View.php',
|
||||
'Kirby\\Toolkit\\Xml' => __DIR__ . '/../..' . '/src/Toolkit/Xml.php',
|
||||
'Kirby\\Uuid\\BlockUuid' => __DIR__ . '/../..' . '/src/Uuid/BlockUuid.php',
|
||||
'Kirby\\Uuid\\FieldUuid' => __DIR__ . '/../..' . '/src/Uuid/FieldUuid.php',
|
||||
'Kirby\\Uuid\\FileUuid' => __DIR__ . '/../..' . '/src/Uuid/FileUuid.php',
|
||||
'Kirby\\Uuid\\HasUuids' => __DIR__ . '/../..' . '/src/Uuid/HasUuids.php',
|
||||
'Kirby\\Uuid\\Identifiable' => __DIR__ . '/../..' . '/src/Uuid/Identifiable.php',
|
||||
'Kirby\\Uuid\\ModelUuid' => __DIR__ . '/../..' . '/src/Uuid/ModelUuid.php',
|
||||
'Kirby\\Uuid\\PageUuid' => __DIR__ . '/../..' . '/src/Uuid/PageUuid.php',
|
||||
'Kirby\\Uuid\\SiteUuid' => __DIR__ . '/../..' . '/src/Uuid/SiteUuid.php',
|
||||
'Kirby\\Uuid\\StructureUuid' => __DIR__ . '/../..' . '/src/Uuid/StructureUuid.php',
|
||||
'Kirby\\Uuid\\Uri' => __DIR__ . '/../..' . '/src/Uuid/Uri.php',
|
||||
'Kirby\\Uuid\\UserUuid' => __DIR__ . '/../..' . '/src/Uuid/UserUuid.php',
|
||||
'Kirby\\Uuid\\Uuid' => __DIR__ . '/../..' . '/src/Uuid/Uuid.php',
|
||||
'Kirby\\Uuid\\Uuids' => __DIR__ . '/../..' . '/src/Uuid/Uuids.php',
|
||||
'Laminas\\Escaper\\Escaper' => __DIR__ . '/..' . '/laminas/laminas-escaper/src/Escaper.php',
|
||||
'Laminas\\Escaper\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-escaper/src/Exception/ExceptionInterface.php',
|
||||
'Laminas\\Escaper\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-escaper/src/Exception/InvalidArgumentException.php',
|
||||
'Laminas\\Escaper\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-escaper/src/Exception/RuntimeException.php',
|
||||
'League\\ColorExtractor\\Color' => __DIR__ . '/..' . '/league/color-extractor/src/Color.php',
|
||||
'League\\ColorExtractor\\ColorExtractor' => __DIR__ . '/..' . '/league/color-extractor/src/ColorExtractor.php',
|
||||
'League\\ColorExtractor\\Palette' => __DIR__ . '/..' . '/league/color-extractor/src/Palette.php',
|
||||
'Michelf\\SmartyPants' => __DIR__ . '/..' . '/michelf/php-smartypants/Michelf/SmartyPants.php',
|
||||
'Michelf\\SmartyPantsTypographer' => __DIR__ . '/..' . '/michelf/php-smartypants/Michelf/SmartyPantsTypographer.php',
|
||||
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'PHPMailer\\PHPMailer\\DSNConfigurator' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/DSNConfigurator.php',
|
||||
'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php',
|
||||
'PHPMailer\\PHPMailer\\OAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuth.php',
|
||||
'PHPMailer\\PHPMailer\\OAuthTokenProvider' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuthTokenProvider.php',
|
||||
'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php',
|
||||
'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php',
|
||||
'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php',
|
||||
'Parsedown' => __DIR__ . '/../..' . '/dependencies/parsedown/Parsedown.php',
|
||||
'ParsedownExtra' => __DIR__ . '/../..' . '/dependencies/parsedown-extra/ParsedownExtra.php',
|
||||
'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/src/AbstractLogger.php',
|
||||
'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/src/InvalidArgumentException.php',
|
||||
'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/src/LogLevel.php',
|
||||
'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareInterface.php',
|
||||
'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareTrait.php',
|
||||
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerInterface.php',
|
||||
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerTrait.php',
|
||||
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/src/NullLogger.php',
|
||||
'Spyc' => __DIR__ . '/../..' . '/dependencies/spyc/Spyc.php',
|
||||
'Symfony\\Component\\Yaml\\Command\\LintCommand' => __DIR__ . '/..' . '/symfony/yaml/Command/LintCommand.php',
|
||||
'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php',
|
||||
'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php',
|
||||
'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php',
|
||||
'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php',
|
||||
'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php',
|
||||
'Symfony\\Component\\Yaml\\Tag\\TaggedValue' => __DIR__ . '/..' . '/symfony/yaml/Tag/TaggedValue.php',
|
||||
'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php',
|
||||
'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Whoops\\Exception\\ErrorException' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/ErrorException.php',
|
||||
'Whoops\\Exception\\Formatter' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Formatter.php',
|
||||
'Whoops\\Exception\\Frame' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Frame.php',
|
||||
'Whoops\\Exception\\FrameCollection' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/FrameCollection.php',
|
||||
'Whoops\\Exception\\Inspector' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/Inspector.php',
|
||||
'Whoops\\Handler\\CallbackHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/CallbackHandler.php',
|
||||
'Whoops\\Handler\\Handler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/Handler.php',
|
||||
'Whoops\\Handler\\HandlerInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/HandlerInterface.php',
|
||||
'Whoops\\Handler\\JsonResponseHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php',
|
||||
'Whoops\\Handler\\PlainTextHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php',
|
||||
'Whoops\\Handler\\PrettyPageHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php',
|
||||
'Whoops\\Handler\\XmlResponseHandler' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php',
|
||||
'Whoops\\Inspector\\InspectorFactory' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorFactory.php',
|
||||
'Whoops\\Inspector\\InspectorFactoryInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorFactoryInterface.php',
|
||||
'Whoops\\Inspector\\InspectorInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Inspector/InspectorInterface.php',
|
||||
'Whoops\\Run' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Run.php',
|
||||
'Whoops\\RunInterface' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/RunInterface.php',
|
||||
'Whoops\\Util\\HtmlDumperOutput' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/HtmlDumperOutput.php',
|
||||
'Whoops\\Util\\Misc' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/Misc.php',
|
||||
'Whoops\\Util\\SystemFacade' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/SystemFacade.php',
|
||||
'Whoops\\Util\\TemplateHelper' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
|
||||
'claviska\\SimpleImage' => __DIR__ . '/..' . '/claviska/simpleimage/src/claviska/SimpleImage.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::$prefixDirsPsr4;
|
||||
$loader->prefixesPsr0 = ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::$prefixesPsr0;
|
||||
$loader->classMap = ComposerStaticInit0bf5c8a9cfa251a218fc581ac888fe35::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
1136
public/kirby/vendor/composer/installed.json
vendored
1136
public/kirby/vendor/composer/installed.json
vendored
File diff suppressed because it is too large
Load diff
179
public/kirby/vendor/composer/installed.php
vendored
179
public/kirby/vendor/composer/installed.php
vendored
|
|
@ -1,179 +0,0 @@
|
|||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'getkirby/cms',
|
||||
'pretty_version' => '4.4.0',
|
||||
'version' => '4.4.0.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev' => true,
|
||||
),
|
||||
'versions' => array(
|
||||
'christian-riesen/base32' => array(
|
||||
'pretty_version' => '1.6.0',
|
||||
'version' => '1.6.0.0',
|
||||
'reference' => '2e82dab3baa008e24a505649b0d583c31d31e894',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../christian-riesen/base32',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'claviska/simpleimage' => array(
|
||||
'pretty_version' => '4.2.0',
|
||||
'version' => '4.2.0.0',
|
||||
'reference' => 'dfbe53c01dae8467468ef2b817c09b786a7839d2',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../claviska/simpleimage',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'composer/semver' => array(
|
||||
'pretty_version' => '3.4.2',
|
||||
'version' => '3.4.2.0',
|
||||
'reference' => 'c51258e759afdb17f1fd1fe83bc12baaef6309d6',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/./semver',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'filp/whoops' => array(
|
||||
'pretty_version' => '2.15.4',
|
||||
'version' => '2.15.4.0',
|
||||
'reference' => 'a139776fa3f5985a50b509f2a02ff0f709d2a546',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../filp/whoops',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'getkirby/cms' => array(
|
||||
'pretty_version' => '4.4.0',
|
||||
'version' => '4.4.0.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'getkirby/composer-installer' => array(
|
||||
'pretty_version' => '1.2.1',
|
||||
'version' => '1.2.1.0',
|
||||
'reference' => 'c98ece30bfba45be7ce457e1102d1b169d922f3d',
|
||||
'type' => 'composer-plugin',
|
||||
'install_path' => __DIR__ . '/../getkirby/composer-installer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'laminas/laminas-escaper' => array(
|
||||
'pretty_version' => '2.13.0',
|
||||
'version' => '2.13.0.0',
|
||||
'reference' => 'af459883f4018d0f8a0c69c7a209daef3bf973ba',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../laminas/laminas-escaper',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/color-extractor' => array(
|
||||
'pretty_version' => '0.4.0',
|
||||
'version' => '0.4.0.0',
|
||||
'reference' => '21fcac6249c5ef7d00eb83e128743ee6678fe505',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/color-extractor',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'matthecat/colorextractor' => array(
|
||||
'dev_requirement' => false,
|
||||
'replaced' => array(
|
||||
0 => '*',
|
||||
),
|
||||
),
|
||||
'michelf/php-smartypants' => array(
|
||||
'pretty_version' => '1.8.1',
|
||||
'version' => '1.8.1.0',
|
||||
'reference' => '47d17c90a4dfd0ccf1f87e25c65e6c8012415aad',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../michelf/php-smartypants',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.9.1',
|
||||
'version' => '6.9.1.0',
|
||||
'reference' => '039de174cd9c17a8389754d3b877a2ed22743e18',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/log' => array(
|
||||
'pretty_version' => '3.0.2',
|
||||
'version' => '3.0.2.0',
|
||||
'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/log',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/deprecation-contracts' => array(
|
||||
'pretty_version' => 'v3.5.0',
|
||||
'version' => '3.5.0.0',
|
||||
'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-ctype' => array(
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.30.0',
|
||||
'version' => '1.30.0.0',
|
||||
'reference' => 'a6e83bdeb3c84391d1dfe16f42e40727ce524a5c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-normalizer' => array(
|
||||
'pretty_version' => 'v1.31.0',
|
||||
'version' => '1.31.0.0',
|
||||
'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.30.0',
|
||||
'version' => '1.30.0.0',
|
||||
'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'dev_requirement' => false,
|
||||
'replaced' => array(
|
||||
0 => '*',
|
||||
),
|
||||
),
|
||||
'symfony/yaml' => array(
|
||||
'pretty_version' => 'v6.4.11',
|
||||
'version' => '6.4.11.0',
|
||||
'reference' => 'be37e7f13195e05ab84ca5269365591edd240335',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/yaml',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
19
public/kirby/vendor/composer/semver/LICENSE
vendored
19
public/kirby/vendor/composer/semver/LICENSE
vendored
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (C) 2015 Composer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"name": "composer/semver",
|
||||
"description": "Semver library that offers utilities, version constraint parsing and validation.",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"semver",
|
||||
"semantic",
|
||||
"versioning",
|
||||
"validation"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
},
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com",
|
||||
"homepage": "http://robbast.nl"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/semver/issues"
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5",
|
||||
"phpstan/phpstan": "^1.4"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Semver\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Composer\\Semver\\": "tests"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
|
||||
"phpstan": "@php vendor/bin/phpstan analyse"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
class Comparator
|
||||
{
|
||||
/**
|
||||
* Evaluates the expression: $version1 > $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function greaterThan($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '>', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 >= $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function greaterThanOrEqualTo($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '>=', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 < $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function lessThan($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '<', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 <= $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function lessThanOrEqualTo($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '<=', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 == $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function equalTo($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '==', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 != $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function notEqualTo($version1, $version2)
|
||||
{
|
||||
return self::compare($version1, '!=', $version2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $version1 $operator $version2.
|
||||
*
|
||||
* @param string $version1
|
||||
* @param string $operator
|
||||
* @param string $version2
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-param Constraint::STR_OP_* $operator
|
||||
*/
|
||||
public static function compare($version1, $operator, $version2)
|
||||
{
|
||||
$constraint = new Constraint($operator, $version2);
|
||||
|
||||
return $constraint->matchSpecific(new Constraint('==', $version1), true);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
|
||||
/**
|
||||
* Helper class to evaluate constraint by compiling and reusing the code to evaluate
|
||||
*/
|
||||
class CompilingMatcher
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
* @phpstan-var array<string, callable>
|
||||
*/
|
||||
private static $compiledCheckerCache = array();
|
||||
/**
|
||||
* @var array
|
||||
* @phpstan-var array<string, bool>
|
||||
*/
|
||||
private static $resultCache = array();
|
||||
|
||||
/** @var bool */
|
||||
private static $enabled;
|
||||
|
||||
/**
|
||||
* @phpstan-var array<Constraint::OP_*, Constraint::STR_OP_*>
|
||||
*/
|
||||
private static $transOpInt = array(
|
||||
Constraint::OP_EQ => Constraint::STR_OP_EQ,
|
||||
Constraint::OP_LT => Constraint::STR_OP_LT,
|
||||
Constraint::OP_LE => Constraint::STR_OP_LE,
|
||||
Constraint::OP_GT => Constraint::STR_OP_GT,
|
||||
Constraint::OP_GE => Constraint::STR_OP_GE,
|
||||
Constraint::OP_NE => Constraint::STR_OP_NE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Clears the memoization cache once you are done
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function clear()
|
||||
{
|
||||
self::$resultCache = array();
|
||||
self::$compiledCheckerCache = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the expression: $constraint match $operator $version
|
||||
*
|
||||
* @param ConstraintInterface $constraint
|
||||
* @param int $operator
|
||||
* @phpstan-param Constraint::OP_* $operator
|
||||
* @param string $version
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function match(ConstraintInterface $constraint, $operator, $version)
|
||||
{
|
||||
$resultCacheKey = $operator.$constraint.';'.$version;
|
||||
|
||||
if (isset(self::$resultCache[$resultCacheKey])) {
|
||||
return self::$resultCache[$resultCacheKey];
|
||||
}
|
||||
|
||||
if (self::$enabled === null) {
|
||||
self::$enabled = !\in_array('eval', explode(',', (string) ini_get('disable_functions')), true);
|
||||
}
|
||||
if (!self::$enabled) {
|
||||
return self::$resultCache[$resultCacheKey] = $constraint->matches(new Constraint(self::$transOpInt[$operator], $version));
|
||||
}
|
||||
|
||||
$cacheKey = $operator.$constraint;
|
||||
if (!isset(self::$compiledCheckerCache[$cacheKey])) {
|
||||
$code = $constraint->compile($operator);
|
||||
self::$compiledCheckerCache[$cacheKey] = $function = eval('return function($v, $b){return '.$code.';};');
|
||||
} else {
|
||||
$function = self::$compiledCheckerCache[$cacheKey];
|
||||
}
|
||||
|
||||
return self::$resultCache[$resultCacheKey] = $function($version, strpos($version, 'dev-') === 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
class Bound
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $version;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $isInclusive;
|
||||
|
||||
/**
|
||||
* @param string $version
|
||||
* @param bool $isInclusive
|
||||
*/
|
||||
public function __construct($version, $isInclusive)
|
||||
{
|
||||
$this->version = $version;
|
||||
$this->isInclusive = $isInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isInclusive()
|
||||
{
|
||||
return $this->isInclusive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isZero()
|
||||
{
|
||||
return $this->getVersion() === '0.0.0.0-dev' && $this->isInclusive();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPositiveInfinity()
|
||||
{
|
||||
return $this->getVersion() === PHP_INT_MAX.'.0.0.0' && !$this->isInclusive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares a bound to another with a given operator.
|
||||
*
|
||||
* @param Bound $other
|
||||
* @param string $operator
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function compareTo(Bound $other, $operator)
|
||||
{
|
||||
if (!\in_array($operator, array('<', '>'), true)) {
|
||||
throw new \InvalidArgumentException('Does not support any other operator other than > or <.');
|
||||
}
|
||||
|
||||
// If they are the same it doesn't matter
|
||||
if ($this == $other) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$compareResult = version_compare($this->getVersion(), $other->getVersion());
|
||||
|
||||
// Not the same version means we don't need to check if the bounds are inclusive or not
|
||||
if (0 !== $compareResult) {
|
||||
return (('>' === $operator) ? 1 : -1) === $compareResult;
|
||||
}
|
||||
|
||||
// Question we're answering here is "am I higher than $other?"
|
||||
return '>' === $operator ? $other->isInclusive() : !$other->isInclusive();
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return sprintf(
|
||||
'%s [%s]',
|
||||
$this->getVersion(),
|
||||
$this->isInclusive() ? 'inclusive' : 'exclusive'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function zero()
|
||||
{
|
||||
return new Bound('0.0.0.0-dev', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function positiveInfinity()
|
||||
{
|
||||
return new Bound(PHP_INT_MAX.'.0.0.0', false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,435 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
/**
|
||||
* Defines a constraint.
|
||||
*/
|
||||
class Constraint implements ConstraintInterface
|
||||
{
|
||||
/* operator integer values */
|
||||
const OP_EQ = 0;
|
||||
const OP_LT = 1;
|
||||
const OP_LE = 2;
|
||||
const OP_GT = 3;
|
||||
const OP_GE = 4;
|
||||
const OP_NE = 5;
|
||||
|
||||
/* operator string values */
|
||||
const STR_OP_EQ = '==';
|
||||
const STR_OP_EQ_ALT = '=';
|
||||
const STR_OP_LT = '<';
|
||||
const STR_OP_LE = '<=';
|
||||
const STR_OP_GT = '>';
|
||||
const STR_OP_GE = '>=';
|
||||
const STR_OP_NE = '!=';
|
||||
const STR_OP_NE_ALT = '<>';
|
||||
|
||||
/**
|
||||
* Operator to integer translation table.
|
||||
*
|
||||
* @var array
|
||||
* @phpstan-var array<self::STR_OP_*, self::OP_*>
|
||||
*/
|
||||
private static $transOpStr = array(
|
||||
'=' => self::OP_EQ,
|
||||
'==' => self::OP_EQ,
|
||||
'<' => self::OP_LT,
|
||||
'<=' => self::OP_LE,
|
||||
'>' => self::OP_GT,
|
||||
'>=' => self::OP_GE,
|
||||
'<>' => self::OP_NE,
|
||||
'!=' => self::OP_NE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Integer to operator translation table.
|
||||
*
|
||||
* @var array
|
||||
* @phpstan-var array<self::OP_*, self::STR_OP_*>
|
||||
*/
|
||||
private static $transOpInt = array(
|
||||
self::OP_EQ => '==',
|
||||
self::OP_LT => '<',
|
||||
self::OP_LE => '<=',
|
||||
self::OP_GT => '>',
|
||||
self::OP_GE => '>=',
|
||||
self::OP_NE => '!=',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @phpstan-var self::OP_*
|
||||
*/
|
||||
protected $operator;
|
||||
|
||||
/** @var string */
|
||||
protected $version;
|
||||
|
||||
/** @var string|null */
|
||||
protected $prettyString;
|
||||
|
||||
/** @var Bound */
|
||||
protected $lowerBound;
|
||||
|
||||
/** @var Bound */
|
||||
protected $upperBound;
|
||||
|
||||
/**
|
||||
* Sets operator and version to compare with.
|
||||
*
|
||||
* @param string $operator
|
||||
* @param string $version
|
||||
*
|
||||
* @throws \InvalidArgumentException if invalid operator is given.
|
||||
*
|
||||
* @phpstan-param self::STR_OP_* $operator
|
||||
*/
|
||||
public function __construct($operator, $version)
|
||||
{
|
||||
if (!isset(self::$transOpStr[$operator])) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Invalid operator "%s" given, expected one of: %s',
|
||||
$operator,
|
||||
implode(', ', self::getSupportedOperators())
|
||||
));
|
||||
}
|
||||
|
||||
$this->operator = self::$transOpStr[$operator];
|
||||
$this->version = $version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @phpstan-return self::STR_OP_*
|
||||
*/
|
||||
public function getOperator()
|
||||
{
|
||||
return self::$transOpInt[$this->operator];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface $provider
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matches(ConstraintInterface $provider)
|
||||
{
|
||||
if ($provider instanceof self) {
|
||||
return $this->matchSpecific($provider);
|
||||
}
|
||||
|
||||
// turn matching around to find a match
|
||||
return $provider->matches($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setPrettyString($prettyString)
|
||||
{
|
||||
$this->prettyString = $prettyString;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPrettyString()
|
||||
{
|
||||
if ($this->prettyString) {
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return $this->__toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all supported comparison operators.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @phpstan-return list<self::STR_OP_*>
|
||||
*/
|
||||
public static function getSupportedOperators()
|
||||
{
|
||||
return array_keys(self::$transOpStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @return int
|
||||
*
|
||||
* @phpstan-param self::STR_OP_* $operator
|
||||
* @phpstan-return self::OP_*
|
||||
*/
|
||||
public static function getOperatorConstant($operator)
|
||||
{
|
||||
return self::$transOpStr[$operator];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $a
|
||||
* @param string $b
|
||||
* @param string $operator
|
||||
* @param bool $compareBranches
|
||||
*
|
||||
* @throws \InvalidArgumentException if invalid operator is given.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @phpstan-param self::STR_OP_* $operator
|
||||
*/
|
||||
public function versionCompare($a, $b, $operator, $compareBranches = false)
|
||||
{
|
||||
if (!isset(self::$transOpStr[$operator])) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Invalid operator "%s" given, expected one of: %s',
|
||||
$operator,
|
||||
implode(', ', self::getSupportedOperators())
|
||||
));
|
||||
}
|
||||
|
||||
$aIsBranch = strpos($a, 'dev-') === 0;
|
||||
$bIsBranch = strpos($b, 'dev-') === 0;
|
||||
|
||||
if ($operator === '!=' && ($aIsBranch || $bIsBranch)) {
|
||||
return $a !== $b;
|
||||
}
|
||||
|
||||
if ($aIsBranch && $bIsBranch) {
|
||||
return $operator === '==' && $a === $b;
|
||||
}
|
||||
|
||||
// when branches are not comparable, we make sure dev branches never match anything
|
||||
if (!$compareBranches && ($aIsBranch || $bIsBranch)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return \version_compare($a, $b, $operator);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function compile($otherOperator)
|
||||
{
|
||||
if (strpos($this->version, 'dev-') === 0) {
|
||||
if (self::OP_EQ === $this->operator) {
|
||||
if (self::OP_EQ === $otherOperator) {
|
||||
return sprintf('$b && $v === %s', \var_export($this->version, true));
|
||||
}
|
||||
if (self::OP_NE === $otherOperator) {
|
||||
return sprintf('!$b || $v !== %s', \var_export($this->version, true));
|
||||
}
|
||||
return 'false';
|
||||
}
|
||||
|
||||
if (self::OP_NE === $this->operator) {
|
||||
if (self::OP_EQ === $otherOperator) {
|
||||
return sprintf('!$b || $v !== %s', \var_export($this->version, true));
|
||||
}
|
||||
if (self::OP_NE === $otherOperator) {
|
||||
return 'true';
|
||||
}
|
||||
return '!$b';
|
||||
}
|
||||
|
||||
return 'false';
|
||||
}
|
||||
|
||||
if (self::OP_EQ === $this->operator) {
|
||||
if (self::OP_EQ === $otherOperator) {
|
||||
return sprintf('\version_compare($v, %s, \'==\')', \var_export($this->version, true));
|
||||
}
|
||||
if (self::OP_NE === $otherOperator) {
|
||||
return sprintf('$b || \version_compare($v, %s, \'!=\')', \var_export($this->version, true));
|
||||
}
|
||||
|
||||
return sprintf('!$b && \version_compare(%s, $v, \'%s\')', \var_export($this->version, true), self::$transOpInt[$otherOperator]);
|
||||
}
|
||||
|
||||
if (self::OP_NE === $this->operator) {
|
||||
if (self::OP_EQ === $otherOperator) {
|
||||
return sprintf('$b || (!$b && \version_compare($v, %s, \'!=\'))', \var_export($this->version, true));
|
||||
}
|
||||
|
||||
if (self::OP_NE === $otherOperator) {
|
||||
return 'true';
|
||||
}
|
||||
return '!$b';
|
||||
}
|
||||
|
||||
if (self::OP_LT === $this->operator || self::OP_LE === $this->operator) {
|
||||
if (self::OP_LT === $otherOperator || self::OP_LE === $otherOperator) {
|
||||
return '!$b';
|
||||
}
|
||||
} else { // $this->operator must be self::OP_GT || self::OP_GE here
|
||||
if (self::OP_GT === $otherOperator || self::OP_GE === $otherOperator) {
|
||||
return '!$b';
|
||||
}
|
||||
}
|
||||
|
||||
if (self::OP_NE === $otherOperator) {
|
||||
return 'true';
|
||||
}
|
||||
|
||||
$codeComparison = sprintf('\version_compare($v, %s, \'%s\')', \var_export($this->version, true), self::$transOpInt[$this->operator]);
|
||||
if ($this->operator === self::OP_LE) {
|
||||
if ($otherOperator === self::OP_GT) {
|
||||
return sprintf('!$b && \version_compare($v, %s, \'!=\') && ', \var_export($this->version, true)) . $codeComparison;
|
||||
}
|
||||
} elseif ($this->operator === self::OP_GE) {
|
||||
if ($otherOperator === self::OP_LT) {
|
||||
return sprintf('!$b && \version_compare($v, %s, \'!=\') && ', \var_export($this->version, true)) . $codeComparison;
|
||||
}
|
||||
}
|
||||
|
||||
return sprintf('!$b && %s', $codeComparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Constraint $provider
|
||||
* @param bool $compareBranches
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matchSpecific(Constraint $provider, $compareBranches = false)
|
||||
{
|
||||
$noEqualOp = str_replace('=', '', self::$transOpInt[$this->operator]);
|
||||
$providerNoEqualOp = str_replace('=', '', self::$transOpInt[$provider->operator]);
|
||||
|
||||
$isEqualOp = self::OP_EQ === $this->operator;
|
||||
$isNonEqualOp = self::OP_NE === $this->operator;
|
||||
$isProviderEqualOp = self::OP_EQ === $provider->operator;
|
||||
$isProviderNonEqualOp = self::OP_NE === $provider->operator;
|
||||
|
||||
// '!=' operator is match when other operator is not '==' operator or version is not match
|
||||
// these kinds of comparisons always have a solution
|
||||
if ($isNonEqualOp || $isProviderNonEqualOp) {
|
||||
if ($isNonEqualOp && !$isProviderNonEqualOp && !$isProviderEqualOp && strpos($provider->version, 'dev-') === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($isProviderNonEqualOp && !$isNonEqualOp && !$isEqualOp && strpos($this->version, 'dev-') === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$isEqualOp && !$isProviderEqualOp) {
|
||||
return true;
|
||||
}
|
||||
return $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
|
||||
}
|
||||
|
||||
// an example for the condition is <= 2.0 & < 1.0
|
||||
// these kinds of comparisons always have a solution
|
||||
if ($this->operator !== self::OP_EQ && $noEqualOp === $providerNoEqualOp) {
|
||||
return !(strpos($this->version, 'dev-') === 0 || strpos($provider->version, 'dev-') === 0);
|
||||
}
|
||||
|
||||
$version1 = $isEqualOp ? $this->version : $provider->version;
|
||||
$version2 = $isEqualOp ? $provider->version : $this->version;
|
||||
$operator = $isEqualOp ? $provider->operator : $this->operator;
|
||||
|
||||
if ($this->versionCompare($version1, $version2, self::$transOpInt[$operator], $compareBranches)) {
|
||||
// special case, e.g. require >= 1.0 and provide < 1.0
|
||||
// 1.0 >= 1.0 but 1.0 is outside of the provided interval
|
||||
|
||||
return !(self::$transOpInt[$provider->operator] === $providerNoEqualOp
|
||||
&& self::$transOpInt[$this->operator] !== $noEqualOp
|
||||
&& \version_compare($provider->version, $this->version, '=='));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return self::$transOpInt[$this->operator] . ' ' . $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLowerBound()
|
||||
{
|
||||
$this->extractBounds();
|
||||
|
||||
return $this->lowerBound;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getUpperBound()
|
||||
{
|
||||
$this->extractBounds();
|
||||
|
||||
return $this->upperBound;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function extractBounds()
|
||||
{
|
||||
if (null !== $this->lowerBound) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Branches
|
||||
if (strpos($this->version, 'dev-') === 0) {
|
||||
$this->lowerBound = Bound::zero();
|
||||
$this->upperBound = Bound::positiveInfinity();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
switch ($this->operator) {
|
||||
case self::OP_EQ:
|
||||
$this->lowerBound = new Bound($this->version, true);
|
||||
$this->upperBound = new Bound($this->version, true);
|
||||
break;
|
||||
case self::OP_LT:
|
||||
$this->lowerBound = Bound::zero();
|
||||
$this->upperBound = new Bound($this->version, false);
|
||||
break;
|
||||
case self::OP_LE:
|
||||
$this->lowerBound = Bound::zero();
|
||||
$this->upperBound = new Bound($this->version, true);
|
||||
break;
|
||||
case self::OP_GT:
|
||||
$this->lowerBound = new Bound($this->version, false);
|
||||
$this->upperBound = Bound::positiveInfinity();
|
||||
break;
|
||||
case self::OP_GE:
|
||||
$this->lowerBound = new Bound($this->version, true);
|
||||
$this->upperBound = Bound::positiveInfinity();
|
||||
break;
|
||||
case self::OP_NE:
|
||||
$this->lowerBound = Bound::zero();
|
||||
$this->upperBound = Bound::positiveInfinity();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
/**
|
||||
* DO NOT IMPLEMENT this interface. It is only meant for usage as a type hint
|
||||
* in libraries relying on composer/semver but creating your own constraint class
|
||||
* that implements this interface is not a supported use case and will cause the
|
||||
* composer/semver components to return unexpected results.
|
||||
*/
|
||||
interface ConstraintInterface
|
||||
{
|
||||
/**
|
||||
* Checks whether the given constraint intersects in any way with this constraint
|
||||
*
|
||||
* @param ConstraintInterface $provider
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matches(ConstraintInterface $provider);
|
||||
|
||||
/**
|
||||
* Provides a compiled version of the constraint for the given operator
|
||||
* The compiled version must be a PHP expression.
|
||||
* Executor of compile version must provide 2 variables:
|
||||
* - $v = the string version to compare with
|
||||
* - $b = whether or not the version is a non-comparable branch (starts with "dev-")
|
||||
*
|
||||
* @see Constraint::OP_* for the list of available operators.
|
||||
* @example return '!$b && version_compare($v, '1.0', '>')';
|
||||
*
|
||||
* @param int $otherOperator one Constraint::OP_*
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @phpstan-param Constraint::OP_* $otherOperator
|
||||
*/
|
||||
public function compile($otherOperator);
|
||||
|
||||
/**
|
||||
* @return Bound
|
||||
*/
|
||||
public function getUpperBound();
|
||||
|
||||
/**
|
||||
* @return Bound
|
||||
*/
|
||||
public function getLowerBound();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPrettyString();
|
||||
|
||||
/**
|
||||
* @param string|null $prettyString
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPrettyString($prettyString);
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString();
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
/**
|
||||
* Defines the absence of a constraint.
|
||||
*
|
||||
* This constraint matches everything.
|
||||
*/
|
||||
class MatchAllConstraint implements ConstraintInterface
|
||||
{
|
||||
/** @var string|null */
|
||||
protected $prettyString;
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface $provider
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matches(ConstraintInterface $provider)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function compile($otherOperator)
|
||||
{
|
||||
return 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setPrettyString($prettyString)
|
||||
{
|
||||
$this->prettyString = $prettyString;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPrettyString()
|
||||
{
|
||||
if ($this->prettyString) {
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return (string) $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return '*';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getUpperBound()
|
||||
{
|
||||
return Bound::positiveInfinity();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLowerBound()
|
||||
{
|
||||
return Bound::zero();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
/**
|
||||
* Blackhole of constraints, nothing escapes it
|
||||
*/
|
||||
class MatchNoneConstraint implements ConstraintInterface
|
||||
{
|
||||
/** @var string|null */
|
||||
protected $prettyString;
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface $provider
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matches(ConstraintInterface $provider)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function compile($otherOperator)
|
||||
{
|
||||
return 'false';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setPrettyString($prettyString)
|
||||
{
|
||||
$this->prettyString = $prettyString;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPrettyString()
|
||||
{
|
||||
if ($this->prettyString) {
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return (string) $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return '[]';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getUpperBound()
|
||||
{
|
||||
return new Bound('0.0.0.0-dev', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLowerBound()
|
||||
{
|
||||
return new Bound('0.0.0.0-dev', false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,325 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
/**
|
||||
* Defines a conjunctive or disjunctive set of constraints.
|
||||
*/
|
||||
class MultiConstraint implements ConstraintInterface
|
||||
{
|
||||
/**
|
||||
* @var ConstraintInterface[]
|
||||
* @phpstan-var non-empty-array<ConstraintInterface>
|
||||
*/
|
||||
protected $constraints;
|
||||
|
||||
/** @var string|null */
|
||||
protected $prettyString;
|
||||
|
||||
/** @var string|null */
|
||||
protected $string;
|
||||
|
||||
/** @var bool */
|
||||
protected $conjunctive;
|
||||
|
||||
/** @var Bound|null */
|
||||
protected $lowerBound;
|
||||
|
||||
/** @var Bound|null */
|
||||
protected $upperBound;
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface[] $constraints A set of constraints
|
||||
* @param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
|
||||
*
|
||||
* @throws \InvalidArgumentException If less than 2 constraints are passed
|
||||
*/
|
||||
public function __construct(array $constraints, $conjunctive = true)
|
||||
{
|
||||
if (\count($constraints) < 2) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Must provide at least two constraints for a MultiConstraint. Use '.
|
||||
'the regular Constraint class for one constraint only or MatchAllConstraint for none. You may use '.
|
||||
'MultiConstraint::create() which optimizes and handles those cases automatically.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->constraints = $constraints;
|
||||
$this->conjunctive = $conjunctive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ConstraintInterface[]
|
||||
*/
|
||||
public function getConstraints()
|
||||
{
|
||||
return $this->constraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isConjunctive()
|
||||
{
|
||||
return $this->conjunctive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isDisjunctive()
|
||||
{
|
||||
return !$this->conjunctive;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function compile($otherOperator)
|
||||
{
|
||||
$parts = array();
|
||||
foreach ($this->constraints as $constraint) {
|
||||
$code = $constraint->compile($otherOperator);
|
||||
if ($code === 'true') {
|
||||
if (!$this->conjunctive) {
|
||||
return 'true';
|
||||
}
|
||||
} elseif ($code === 'false') {
|
||||
if ($this->conjunctive) {
|
||||
return 'false';
|
||||
}
|
||||
} else {
|
||||
$parts[] = '('.$code.')';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$parts) {
|
||||
return $this->conjunctive ? 'true' : 'false';
|
||||
}
|
||||
|
||||
return $this->conjunctive ? implode('&&', $parts) : implode('||', $parts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface $provider
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matches(ConstraintInterface $provider)
|
||||
{
|
||||
if (false === $this->conjunctive) {
|
||||
foreach ($this->constraints as $constraint) {
|
||||
if ($provider->matches($constraint)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// when matching a conjunctive and a disjunctive multi constraint we have to iterate over the disjunctive one
|
||||
// otherwise we'd return true if different parts of the disjunctive constraint match the conjunctive one
|
||||
// which would lead to incorrect results, e.g. [>1 and <2] would match [<1 or >2] although they do not intersect
|
||||
if ($provider instanceof MultiConstraint && $provider->isDisjunctive()) {
|
||||
return $provider->matches($this);
|
||||
}
|
||||
|
||||
foreach ($this->constraints as $constraint) {
|
||||
if (!$provider->matches($constraint)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function setPrettyString($prettyString)
|
||||
{
|
||||
$this->prettyString = $prettyString;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPrettyString()
|
||||
{
|
||||
if ($this->prettyString) {
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return (string) $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if ($this->string !== null) {
|
||||
return $this->string;
|
||||
}
|
||||
|
||||
$constraints = array();
|
||||
foreach ($this->constraints as $constraint) {
|
||||
$constraints[] = (string) $constraint;
|
||||
}
|
||||
|
||||
return $this->string = '[' . implode($this->conjunctive ? ' ' : ' || ', $constraints) . ']';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getLowerBound()
|
||||
{
|
||||
$this->extractBounds();
|
||||
|
||||
if (null === $this->lowerBound) {
|
||||
throw new \LogicException('extractBounds should have populated the lowerBound property');
|
||||
}
|
||||
|
||||
return $this->lowerBound;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getUpperBound()
|
||||
{
|
||||
$this->extractBounds();
|
||||
|
||||
if (null === $this->upperBound) {
|
||||
throw new \LogicException('extractBounds should have populated the upperBound property');
|
||||
}
|
||||
|
||||
return $this->upperBound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to optimize the constraints as much as possible, meaning
|
||||
* reducing/collapsing congruent constraints etc.
|
||||
* Does not necessarily return a MultiConstraint instance if
|
||||
* things can be reduced to a simple constraint
|
||||
*
|
||||
* @param ConstraintInterface[] $constraints A set of constraints
|
||||
* @param bool $conjunctive Whether the constraints should be treated as conjunctive or disjunctive
|
||||
*
|
||||
* @return ConstraintInterface
|
||||
*/
|
||||
public static function create(array $constraints, $conjunctive = true)
|
||||
{
|
||||
if (0 === \count($constraints)) {
|
||||
return new MatchAllConstraint();
|
||||
}
|
||||
|
||||
if (1 === \count($constraints)) {
|
||||
return $constraints[0];
|
||||
}
|
||||
|
||||
$optimized = self::optimizeConstraints($constraints, $conjunctive);
|
||||
if ($optimized !== null) {
|
||||
list($constraints, $conjunctive) = $optimized;
|
||||
if (\count($constraints) === 1) {
|
||||
return $constraints[0];
|
||||
}
|
||||
}
|
||||
|
||||
return new self($constraints, $conjunctive);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ConstraintInterface[] $constraints
|
||||
* @param bool $conjunctive
|
||||
* @return ?array
|
||||
*
|
||||
* @phpstan-return array{0: list<ConstraintInterface>, 1: bool}|null
|
||||
*/
|
||||
private static function optimizeConstraints(array $constraints, $conjunctive)
|
||||
{
|
||||
// parse the two OR groups and if they are contiguous we collapse
|
||||
// them into one constraint
|
||||
// [>= 1 < 2] || [>= 2 < 3] || [>= 3 < 4] => [>= 1 < 4]
|
||||
if (!$conjunctive) {
|
||||
$left = $constraints[0];
|
||||
$mergedConstraints = array();
|
||||
$optimized = false;
|
||||
for ($i = 1, $l = \count($constraints); $i < $l; $i++) {
|
||||
$right = $constraints[$i];
|
||||
if (
|
||||
$left instanceof self
|
||||
&& $left->conjunctive
|
||||
&& $right instanceof self
|
||||
&& $right->conjunctive
|
||||
&& \count($left->constraints) === 2
|
||||
&& \count($right->constraints) === 2
|
||||
&& ($left0 = (string) $left->constraints[0])
|
||||
&& $left0[0] === '>' && $left0[1] === '='
|
||||
&& ($left1 = (string) $left->constraints[1])
|
||||
&& $left1[0] === '<'
|
||||
&& ($right0 = (string) $right->constraints[0])
|
||||
&& $right0[0] === '>' && $right0[1] === '='
|
||||
&& ($right1 = (string) $right->constraints[1])
|
||||
&& $right1[0] === '<'
|
||||
&& substr($left1, 2) === substr($right0, 3)
|
||||
) {
|
||||
$optimized = true;
|
||||
$left = new MultiConstraint(
|
||||
array(
|
||||
$left->constraints[0],
|
||||
$right->constraints[1],
|
||||
),
|
||||
true);
|
||||
} else {
|
||||
$mergedConstraints[] = $left;
|
||||
$left = $right;
|
||||
}
|
||||
}
|
||||
if ($optimized) {
|
||||
$mergedConstraints[] = $left;
|
||||
return array($mergedConstraints, false);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Here's the place to put more optimizations
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function extractBounds()
|
||||
{
|
||||
if (null !== $this->lowerBound) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->constraints as $constraint) {
|
||||
if (null === $this->lowerBound || null === $this->upperBound) {
|
||||
$this->lowerBound = $constraint->getLowerBound();
|
||||
$this->upperBound = $constraint->getUpperBound();
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($constraint->getLowerBound()->compareTo($this->lowerBound, $this->isConjunctive() ? '>' : '<')) {
|
||||
$this->lowerBound = $constraint->getLowerBound();
|
||||
}
|
||||
|
||||
if ($constraint->getUpperBound()->compareTo($this->upperBound, $this->isConjunctive() ? '<' : '>')) {
|
||||
$this->upperBound = $constraint->getUpperBound();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
class Interval
|
||||
{
|
||||
/** @var Constraint */
|
||||
private $start;
|
||||
/** @var Constraint */
|
||||
private $end;
|
||||
|
||||
public function __construct(Constraint $start, Constraint $end)
|
||||
{
|
||||
$this->start = $start;
|
||||
$this->end = $end;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Constraint
|
||||
*/
|
||||
public function getStart()
|
||||
{
|
||||
return $this->start;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Constraint
|
||||
*/
|
||||
public function getEnd()
|
||||
{
|
||||
return $this->end;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Constraint
|
||||
*/
|
||||
public static function fromZero()
|
||||
{
|
||||
static $zero;
|
||||
|
||||
if (null === $zero) {
|
||||
$zero = new Constraint('>=', '0.0.0.0-dev');
|
||||
}
|
||||
|
||||
return $zero;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Constraint
|
||||
*/
|
||||
public static function untilPositiveInfinity()
|
||||
{
|
||||
static $positiveInfinity;
|
||||
|
||||
if (null === $positiveInfinity) {
|
||||
$positiveInfinity = new Constraint('<', PHP_INT_MAX.'.0.0.0');
|
||||
}
|
||||
|
||||
return $positiveInfinity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
public static function any()
|
||||
{
|
||||
return new self(self::fromZero(), self::untilPositiveInfinity());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{'names': string[], 'exclude': bool}
|
||||
*/
|
||||
public static function anyDev()
|
||||
{
|
||||
// any == exclude nothing
|
||||
return array('names' => array(), 'exclude' => true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{'names': string[], 'exclude': bool}
|
||||
*/
|
||||
public static function noDev()
|
||||
{
|
||||
// nothing == no names included
|
||||
return array('names' => array(), 'exclude' => false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,478 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
use Composer\Semver\Constraint\MatchAllConstraint;
|
||||
use Composer\Semver\Constraint\MatchNoneConstraint;
|
||||
use Composer\Semver\Constraint\MultiConstraint;
|
||||
|
||||
/**
|
||||
* Helper class generating intervals from constraints
|
||||
*
|
||||
* This contains utilities for:
|
||||
*
|
||||
* - compacting an existing constraint which can be used to combine several into one
|
||||
* by creating a MultiConstraint out of the many constraints you have.
|
||||
*
|
||||
* - checking whether one subset is a subset of another.
|
||||
*
|
||||
* Note: You should call clear to free memoization memory usage when you are done using this class
|
||||
*/
|
||||
class Intervals
|
||||
{
|
||||
/**
|
||||
* @phpstan-var array<string, array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}>
|
||||
*/
|
||||
private static $intervalsCache = array();
|
||||
|
||||
/**
|
||||
* @phpstan-var array<string, int>
|
||||
*/
|
||||
private static $opSortOrder = array(
|
||||
'>=' => -3,
|
||||
'<' => -2,
|
||||
'>' => 2,
|
||||
'<=' => 3,
|
||||
);
|
||||
|
||||
/**
|
||||
* Clears the memoization cache once you are done
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function clear()
|
||||
{
|
||||
self::$intervalsCache = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether $candidate is a subset of $constraint
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isSubsetOf(ConstraintInterface $candidate, ConstraintInterface $constraint)
|
||||
{
|
||||
if ($constraint instanceof MatchAllConstraint) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($candidate instanceof MatchNoneConstraint || $constraint instanceof MatchNoneConstraint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$intersectionIntervals = self::get(new MultiConstraint(array($candidate, $constraint), true));
|
||||
$candidateIntervals = self::get($candidate);
|
||||
if (\count($intersectionIntervals['numeric']) !== \count($candidateIntervals['numeric'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($intersectionIntervals['numeric'] as $index => $interval) {
|
||||
if (!isset($candidateIntervals['numeric'][$index])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((string) $candidateIntervals['numeric'][$index]->getStart() !== (string) $interval->getStart()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((string) $candidateIntervals['numeric'][$index]->getEnd() !== (string) $interval->getEnd()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($intersectionIntervals['branches']['exclude'] !== $candidateIntervals['branches']['exclude']) {
|
||||
return false;
|
||||
}
|
||||
if (\count($intersectionIntervals['branches']['names']) !== \count($candidateIntervals['branches']['names'])) {
|
||||
return false;
|
||||
}
|
||||
foreach ($intersectionIntervals['branches']['names'] as $index => $name) {
|
||||
if ($name !== $candidateIntervals['branches']['names'][$index]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether $a and $b have any intersection, equivalent to $a->matches($b)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function haveIntersections(ConstraintInterface $a, ConstraintInterface $b)
|
||||
{
|
||||
if ($a instanceof MatchAllConstraint || $b instanceof MatchAllConstraint) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($a instanceof MatchNoneConstraint || $b instanceof MatchNoneConstraint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$intersectionIntervals = self::generateIntervals(new MultiConstraint(array($a, $b), true), true);
|
||||
|
||||
return \count($intersectionIntervals['numeric']) > 0 || $intersectionIntervals['branches']['exclude'] || \count($intersectionIntervals['branches']['names']) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to optimize a MultiConstraint
|
||||
*
|
||||
* When merging MultiConstraints together they can get very large, this will
|
||||
* compact it by looking at the real intervals covered by all the constraints
|
||||
* and then creates a new constraint containing only the smallest amount of rules
|
||||
* to match the same intervals.
|
||||
*
|
||||
* @return ConstraintInterface
|
||||
*/
|
||||
public static function compactConstraint(ConstraintInterface $constraint)
|
||||
{
|
||||
if (!$constraint instanceof MultiConstraint) {
|
||||
return $constraint;
|
||||
}
|
||||
|
||||
$intervals = self::generateIntervals($constraint);
|
||||
$constraints = array();
|
||||
$hasNumericMatchAll = false;
|
||||
|
||||
if (\count($intervals['numeric']) === 1 && (string) $intervals['numeric'][0]->getStart() === (string) Interval::fromZero() && (string) $intervals['numeric'][0]->getEnd() === (string) Interval::untilPositiveInfinity()) {
|
||||
$constraints[] = $intervals['numeric'][0]->getStart();
|
||||
$hasNumericMatchAll = true;
|
||||
} else {
|
||||
$unEqualConstraints = array();
|
||||
for ($i = 0, $count = \count($intervals['numeric']); $i < $count; $i++) {
|
||||
$interval = $intervals['numeric'][$i];
|
||||
|
||||
// if current interval ends with < N and next interval begins with > N we can swap this out for != N
|
||||
// but this needs to happen as a conjunctive expression together with the start of the current interval
|
||||
// and end of next interval, so [>=M, <N] || [>N, <P] => [>=M, !=N, <P] but M/P can be skipped if
|
||||
// they are zero/+inf
|
||||
if ($interval->getEnd()->getOperator() === '<' && $i+1 < $count) {
|
||||
$nextInterval = $intervals['numeric'][$i+1];
|
||||
if ($interval->getEnd()->getVersion() === $nextInterval->getStart()->getVersion() && $nextInterval->getStart()->getOperator() === '>') {
|
||||
// only add a start if we didn't already do so, can be skipped if we're looking at second
|
||||
// interval in [>=M, <N] || [>N, <P] || [>P, <Q] where unEqualConstraints currently contains
|
||||
// [>=M, !=N] already and we only want to add !=P right now
|
||||
if (\count($unEqualConstraints) === 0 && (string) $interval->getStart() !== (string) Interval::fromZero()) {
|
||||
$unEqualConstraints[] = $interval->getStart();
|
||||
}
|
||||
$unEqualConstraints[] = new Constraint('!=', $interval->getEnd()->getVersion());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (\count($unEqualConstraints) > 0) {
|
||||
// this is where the end of the following interval of a != constraint is added as explained above
|
||||
if ((string) $interval->getEnd() !== (string) Interval::untilPositiveInfinity()) {
|
||||
$unEqualConstraints[] = $interval->getEnd();
|
||||
}
|
||||
|
||||
// count is 1 if entire constraint is just one != expression
|
||||
if (\count($unEqualConstraints) > 1) {
|
||||
$constraints[] = new MultiConstraint($unEqualConstraints, true);
|
||||
} else {
|
||||
$constraints[] = $unEqualConstraints[0];
|
||||
}
|
||||
|
||||
$unEqualConstraints = array();
|
||||
continue;
|
||||
}
|
||||
|
||||
// convert back >= x - <= x intervals to == x
|
||||
if ($interval->getStart()->getVersion() === $interval->getEnd()->getVersion() && $interval->getStart()->getOperator() === '>=' && $interval->getEnd()->getOperator() === '<=') {
|
||||
$constraints[] = new Constraint('==', $interval->getStart()->getVersion());
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((string) $interval->getStart() === (string) Interval::fromZero()) {
|
||||
$constraints[] = $interval->getEnd();
|
||||
} elseif ((string) $interval->getEnd() === (string) Interval::untilPositiveInfinity()) {
|
||||
$constraints[] = $interval->getStart();
|
||||
} else {
|
||||
$constraints[] = new MultiConstraint(array($interval->getStart(), $interval->getEnd()), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$devConstraints = array();
|
||||
|
||||
if (0 === \count($intervals['branches']['names'])) {
|
||||
if ($intervals['branches']['exclude']) {
|
||||
if ($hasNumericMatchAll) {
|
||||
return new MatchAllConstraint;
|
||||
}
|
||||
// otherwise constraint should contain a != operator and already cover this
|
||||
}
|
||||
} else {
|
||||
foreach ($intervals['branches']['names'] as $branchName) {
|
||||
if ($intervals['branches']['exclude']) {
|
||||
$devConstraints[] = new Constraint('!=', $branchName);
|
||||
} else {
|
||||
$devConstraints[] = new Constraint('==', $branchName);
|
||||
}
|
||||
}
|
||||
|
||||
// excluded branches, e.g. != dev-foo are conjunctive with the interval, so
|
||||
// > 2.0 != dev-foo must return a conjunctive constraint
|
||||
if ($intervals['branches']['exclude']) {
|
||||
if (\count($constraints) > 1) {
|
||||
return new MultiConstraint(array_merge(
|
||||
array(new MultiConstraint($constraints, false)),
|
||||
$devConstraints
|
||||
), true);
|
||||
}
|
||||
|
||||
if (\count($constraints) === 1 && (string)$constraints[0] === (string)Interval::fromZero()) {
|
||||
if (\count($devConstraints) > 1) {
|
||||
return new MultiConstraint($devConstraints, true);
|
||||
}
|
||||
return $devConstraints[0];
|
||||
}
|
||||
|
||||
return new MultiConstraint(array_merge($constraints, $devConstraints), true);
|
||||
}
|
||||
|
||||
// otherwise devConstraints contains a list of == operators for branches which are disjunctive with the
|
||||
// rest of the constraint
|
||||
$constraints = array_merge($constraints, $devConstraints);
|
||||
}
|
||||
|
||||
if (\count($constraints) > 1) {
|
||||
return new MultiConstraint($constraints, false);
|
||||
}
|
||||
|
||||
if (\count($constraints) === 1) {
|
||||
return $constraints[0];
|
||||
}
|
||||
|
||||
return new MatchNoneConstraint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of numeric intervals and branch constraints representing a given constraint
|
||||
*
|
||||
* if the returned numeric array is empty it means the constraint matches nothing in the numeric range (0 - +inf)
|
||||
* if the returned branches array is empty it means no dev-* versions are matched
|
||||
* if a constraint matches all possible dev-* versions, branches will contain Interval::anyDev()
|
||||
*
|
||||
* @return array
|
||||
* @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
|
||||
*/
|
||||
public static function get(ConstraintInterface $constraint)
|
||||
{
|
||||
$key = (string) $constraint;
|
||||
|
||||
if (!isset(self::$intervalsCache[$key])) {
|
||||
self::$intervalsCache[$key] = self::generateIntervals($constraint);
|
||||
}
|
||||
|
||||
return self::$intervalsCache[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $stopOnFirstValidInterval
|
||||
*
|
||||
* @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
|
||||
*/
|
||||
private static function generateIntervals(ConstraintInterface $constraint, $stopOnFirstValidInterval = false)
|
||||
{
|
||||
if ($constraint instanceof MatchAllConstraint) {
|
||||
return array('numeric' => array(new Interval(Interval::fromZero(), Interval::untilPositiveInfinity())), 'branches' => Interval::anyDev());
|
||||
}
|
||||
|
||||
if ($constraint instanceof MatchNoneConstraint) {
|
||||
return array('numeric' => array(), 'branches' => array('names' => array(), 'exclude' => false));
|
||||
}
|
||||
|
||||
if ($constraint instanceof Constraint) {
|
||||
return self::generateSingleConstraintIntervals($constraint);
|
||||
}
|
||||
|
||||
if (!$constraint instanceof MultiConstraint) {
|
||||
throw new \UnexpectedValueException('The constraint passed in should be an MatchAllConstraint, Constraint or MultiConstraint instance, got '.\get_class($constraint).'.');
|
||||
}
|
||||
|
||||
$constraints = $constraint->getConstraints();
|
||||
|
||||
$numericGroups = array();
|
||||
$constraintBranches = array();
|
||||
foreach ($constraints as $c) {
|
||||
$res = self::get($c);
|
||||
$numericGroups[] = $res['numeric'];
|
||||
$constraintBranches[] = $res['branches'];
|
||||
}
|
||||
|
||||
if ($constraint->isDisjunctive()) {
|
||||
$branches = Interval::noDev();
|
||||
foreach ($constraintBranches as $b) {
|
||||
if ($b['exclude']) {
|
||||
if ($branches['exclude']) {
|
||||
// disjunctive constraint, so only exclude what's excluded in all constraints
|
||||
// !=a,!=b || !=b,!=c => !=b
|
||||
$branches['names'] = array_intersect($branches['names'], $b['names']);
|
||||
} else {
|
||||
// disjunctive constraint so exclude all names which are not explicitly included in the alternative
|
||||
// (==b || ==c) || !=a,!=b => !=a
|
||||
$branches['exclude'] = true;
|
||||
$branches['names'] = array_diff($b['names'], $branches['names']);
|
||||
}
|
||||
} else {
|
||||
if ($branches['exclude']) {
|
||||
// disjunctive constraint so exclude all names which are not explicitly included in the alternative
|
||||
// !=a,!=b || (==b || ==c) => !=a
|
||||
$branches['names'] = array_diff($branches['names'], $b['names']);
|
||||
} else {
|
||||
// disjunctive constraint, so just add all the other branches
|
||||
// (==a || ==b) || ==c => ==a || ==b || ==c
|
||||
$branches['names'] = array_merge($branches['names'], $b['names']);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$branches = Interval::anyDev();
|
||||
foreach ($constraintBranches as $b) {
|
||||
if ($b['exclude']) {
|
||||
if ($branches['exclude']) {
|
||||
// conjunctive, so just add all branch names to be excluded
|
||||
// !=a && !=b => !=a,!=b
|
||||
$branches['names'] = array_merge($branches['names'], $b['names']);
|
||||
} else {
|
||||
// conjunctive, so only keep included names which are not excluded
|
||||
// (==a||==c) && !=a,!=b => ==c
|
||||
$branches['names'] = array_diff($branches['names'], $b['names']);
|
||||
}
|
||||
} else {
|
||||
if ($branches['exclude']) {
|
||||
// conjunctive, so only keep included names which are not excluded
|
||||
// !=a,!=b && (==a||==c) => ==c
|
||||
$branches['names'] = array_diff($b['names'], $branches['names']);
|
||||
$branches['exclude'] = false;
|
||||
} else {
|
||||
// conjunctive, so only keep names that are included in both
|
||||
// (==a||==b) && (==a||==c) => ==a
|
||||
$branches['names'] = array_intersect($branches['names'], $b['names']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$branches['names'] = array_unique($branches['names']);
|
||||
|
||||
if (\count($numericGroups) === 1) {
|
||||
return array('numeric' => $numericGroups[0], 'branches' => $branches);
|
||||
}
|
||||
|
||||
$borders = array();
|
||||
foreach ($numericGroups as $group) {
|
||||
foreach ($group as $interval) {
|
||||
$borders[] = array('version' => $interval->getStart()->getVersion(), 'operator' => $interval->getStart()->getOperator(), 'side' => 'start');
|
||||
$borders[] = array('version' => $interval->getEnd()->getVersion(), 'operator' => $interval->getEnd()->getOperator(), 'side' => 'end');
|
||||
}
|
||||
}
|
||||
|
||||
$opSortOrder = self::$opSortOrder;
|
||||
usort($borders, function ($a, $b) use ($opSortOrder) {
|
||||
$order = version_compare($a['version'], $b['version']);
|
||||
if ($order === 0) {
|
||||
return $opSortOrder[$a['operator']] - $opSortOrder[$b['operator']];
|
||||
}
|
||||
|
||||
return $order;
|
||||
});
|
||||
|
||||
$activeIntervals = 0;
|
||||
$intervals = array();
|
||||
$index = 0;
|
||||
$activationThreshold = $constraint->isConjunctive() ? \count($numericGroups) : 1;
|
||||
$start = null;
|
||||
foreach ($borders as $border) {
|
||||
if ($border['side'] === 'start') {
|
||||
$activeIntervals++;
|
||||
} else {
|
||||
$activeIntervals--;
|
||||
}
|
||||
if (!$start && $activeIntervals >= $activationThreshold) {
|
||||
$start = new Constraint($border['operator'], $border['version']);
|
||||
} elseif ($start && $activeIntervals < $activationThreshold) {
|
||||
// filter out invalid intervals like > x - <= x, or >= x - < x
|
||||
if (
|
||||
version_compare($start->getVersion(), $border['version'], '=')
|
||||
&& (
|
||||
($start->getOperator() === '>' && $border['operator'] === '<=')
|
||||
|| ($start->getOperator() === '>=' && $border['operator'] === '<')
|
||||
)
|
||||
) {
|
||||
unset($intervals[$index]);
|
||||
} else {
|
||||
$intervals[$index] = new Interval($start, new Constraint($border['operator'], $border['version']));
|
||||
$index++;
|
||||
|
||||
if ($stopOnFirstValidInterval) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$start = null;
|
||||
}
|
||||
}
|
||||
|
||||
return array('numeric' => $intervals, 'branches' => $branches);
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
|
||||
*/
|
||||
private static function generateSingleConstraintIntervals(Constraint $constraint)
|
||||
{
|
||||
$op = $constraint->getOperator();
|
||||
|
||||
// handle branch constraints first
|
||||
if (strpos($constraint->getVersion(), 'dev-') === 0) {
|
||||
$intervals = array();
|
||||
$branches = array('names' => array(), 'exclude' => false);
|
||||
|
||||
// != dev-foo means any numeric version may match, we treat >/< like != they are not really defined for branches
|
||||
if ($op === '!=') {
|
||||
$intervals[] = new Interval(Interval::fromZero(), Interval::untilPositiveInfinity());
|
||||
$branches = array('names' => array($constraint->getVersion()), 'exclude' => true);
|
||||
} elseif ($op === '==') {
|
||||
$branches['names'][] = $constraint->getVersion();
|
||||
}
|
||||
|
||||
return array(
|
||||
'numeric' => $intervals,
|
||||
'branches' => $branches,
|
||||
);
|
||||
}
|
||||
|
||||
if ($op[0] === '>') { // > & >=
|
||||
return array('numeric' => array(new Interval($constraint, Interval::untilPositiveInfinity())), 'branches' => Interval::noDev());
|
||||
}
|
||||
if ($op[0] === '<') { // < & <=
|
||||
return array('numeric' => array(new Interval(Interval::fromZero(), $constraint)), 'branches' => Interval::noDev());
|
||||
}
|
||||
if ($op === '!=') {
|
||||
// convert !=x to intervals of 0 - <x && >x - +inf + dev*
|
||||
return array('numeric' => array(
|
||||
new Interval(Interval::fromZero(), new Constraint('<', $constraint->getVersion())),
|
||||
new Interval(new Constraint('>', $constraint->getVersion()), Interval::untilPositiveInfinity()),
|
||||
), 'branches' => Interval::anyDev());
|
||||
}
|
||||
|
||||
// convert ==x to an interval of >=x - <=x
|
||||
return array('numeric' => array(
|
||||
new Interval(new Constraint('>=', $constraint->getVersion()), new Constraint('<=', $constraint->getVersion())),
|
||||
), 'branches' => Interval::noDev());
|
||||
}
|
||||
}
|
||||
129
public/kirby/vendor/composer/semver/src/Semver.php
vendored
129
public/kirby/vendor/composer/semver/src/Semver.php
vendored
|
|
@ -1,129 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
class Semver
|
||||
{
|
||||
const SORT_ASC = 1;
|
||||
const SORT_DESC = -1;
|
||||
|
||||
/** @var VersionParser */
|
||||
private static $versionParser;
|
||||
|
||||
/**
|
||||
* Determine if given version satisfies given constraints.
|
||||
*
|
||||
* @param string $version
|
||||
* @param string $constraints
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function satisfies($version, $constraints)
|
||||
{
|
||||
if (null === self::$versionParser) {
|
||||
self::$versionParser = new VersionParser();
|
||||
}
|
||||
|
||||
$versionParser = self::$versionParser;
|
||||
$provider = new Constraint('==', $versionParser->normalize($version));
|
||||
$parsedConstraints = $versionParser->parseConstraints($constraints);
|
||||
|
||||
return $parsedConstraints->matches($provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all versions that satisfy given constraints.
|
||||
*
|
||||
* @param string[] $versions
|
||||
* @param string $constraints
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function satisfiedBy(array $versions, $constraints)
|
||||
{
|
||||
$versions = array_filter($versions, function ($version) use ($constraints) {
|
||||
return Semver::satisfies($version, $constraints);
|
||||
});
|
||||
|
||||
return array_values($versions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort given array of versions.
|
||||
*
|
||||
* @param string[] $versions
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function sort(array $versions)
|
||||
{
|
||||
return self::usort($versions, self::SORT_ASC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort given array of versions in reverse.
|
||||
*
|
||||
* @param string[] $versions
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function rsort(array $versions)
|
||||
{
|
||||
return self::usort($versions, self::SORT_DESC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $versions
|
||||
* @param int $direction
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
private static function usort(array $versions, $direction)
|
||||
{
|
||||
if (null === self::$versionParser) {
|
||||
self::$versionParser = new VersionParser();
|
||||
}
|
||||
|
||||
$versionParser = self::$versionParser;
|
||||
$normalized = array();
|
||||
|
||||
// Normalize outside of usort() scope for minor performance increase.
|
||||
// Creates an array of arrays: [[normalized, key], ...]
|
||||
foreach ($versions as $key => $version) {
|
||||
$normalizedVersion = $versionParser->normalize($version);
|
||||
$normalizedVersion = $versionParser->normalizeDefaultBranch($normalizedVersion);
|
||||
$normalized[] = array($normalizedVersion, $key);
|
||||
}
|
||||
|
||||
usort($normalized, function (array $left, array $right) use ($direction) {
|
||||
if ($left[0] === $right[0]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Comparator::lessThan($left[0], $right[0])) {
|
||||
return -$direction;
|
||||
}
|
||||
|
||||
return $direction;
|
||||
});
|
||||
|
||||
// Recreate input array, using the original indexes which are now in sorted order.
|
||||
$sorted = array();
|
||||
foreach ($normalized as $item) {
|
||||
$sorted[] = $versions[$item[1]];
|
||||
}
|
||||
|
||||
return $sorted;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,591 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of composer/semver.
|
||||
*
|
||||
* (c) Composer <https://github.com/composer>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Semver;
|
||||
|
||||
use Composer\Semver\Constraint\ConstraintInterface;
|
||||
use Composer\Semver\Constraint\MatchAllConstraint;
|
||||
use Composer\Semver\Constraint\MultiConstraint;
|
||||
use Composer\Semver\Constraint\Constraint;
|
||||
|
||||
/**
|
||||
* Version parser.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
*/
|
||||
class VersionParser
|
||||
{
|
||||
/**
|
||||
* Regex to match pre-release data (sort of).
|
||||
*
|
||||
* Due to backwards compatibility:
|
||||
* - Instead of enforcing hyphen, an underscore, dot or nothing at all are also accepted.
|
||||
* - Only stabilities as recognized by Composer are allowed to precede a numerical identifier.
|
||||
* - Numerical-only pre-release identifiers are not supported, see tests.
|
||||
*
|
||||
* |--------------|
|
||||
* [major].[minor].[patch] -[pre-release] +[build-metadata]
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*+)?)?([.-]?dev)?';
|
||||
|
||||
/** @var string */
|
||||
private static $stabilitiesRegex = 'stable|RC|beta|alpha|dev';
|
||||
|
||||
/**
|
||||
* Returns the stability of a version.
|
||||
*
|
||||
* @param string $version
|
||||
*
|
||||
* @return string
|
||||
* @phpstan-return 'stable'|'RC'|'beta'|'alpha'|'dev'
|
||||
*/
|
||||
public static function parseStability($version)
|
||||
{
|
||||
$version = (string) preg_replace('{#.+$}', '', (string) $version);
|
||||
|
||||
if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
|
||||
return 'dev';
|
||||
}
|
||||
|
||||
preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
|
||||
|
||||
if (!empty($match[3])) {
|
||||
return 'dev';
|
||||
}
|
||||
|
||||
if (!empty($match[1])) {
|
||||
if ('beta' === $match[1] || 'b' === $match[1]) {
|
||||
return 'beta';
|
||||
}
|
||||
if ('alpha' === $match[1] || 'a' === $match[1]) {
|
||||
return 'alpha';
|
||||
}
|
||||
if ('rc' === $match[1]) {
|
||||
return 'RC';
|
||||
}
|
||||
}
|
||||
|
||||
return 'stable';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $stability
|
||||
*
|
||||
* @return string
|
||||
* @phpstan-return 'stable'|'RC'|'beta'|'alpha'|'dev'
|
||||
*/
|
||||
public static function normalizeStability($stability)
|
||||
{
|
||||
$stability = strtolower((string) $stability);
|
||||
|
||||
if (!in_array($stability, array('stable', 'rc', 'beta', 'alpha', 'dev'), true)) {
|
||||
throw new \InvalidArgumentException('Invalid stability string "'.$stability.'", expected one of stable, RC, beta, alpha or dev');
|
||||
}
|
||||
|
||||
return $stability === 'rc' ? 'RC' : $stability;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a version string to be able to perform comparisons on it.
|
||||
*
|
||||
* @param string $version
|
||||
* @param ?string $fullVersion optional complete version string to give more context
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function normalize($version, $fullVersion = null)
|
||||
{
|
||||
$version = trim((string) $version);
|
||||
$origVersion = $version;
|
||||
if (null === $fullVersion) {
|
||||
$fullVersion = $version;
|
||||
}
|
||||
|
||||
// strip off aliasing
|
||||
if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) {
|
||||
$version = $match[1];
|
||||
}
|
||||
|
||||
// strip off stability flag
|
||||
if (preg_match('{@(?:' . self::$stabilitiesRegex . ')$}i', $version, $match)) {
|
||||
$version = substr($version, 0, strlen($version) - strlen($match[0]));
|
||||
}
|
||||
|
||||
// normalize master/trunk/default branches to dev-name for BC with 1.x as these used to be valid constraints
|
||||
if (\in_array($version, array('master', 'trunk', 'default'), true)) {
|
||||
$version = 'dev-' . $version;
|
||||
}
|
||||
|
||||
// if requirement is branch-like, use full name
|
||||
if (stripos($version, 'dev-') === 0) {
|
||||
return 'dev-' . substr($version, 4);
|
||||
}
|
||||
|
||||
// strip off build metadata
|
||||
if (preg_match('{^([^,\s+]++)\+[^\s]++$}', $version, $match)) {
|
||||
$version = $match[1];
|
||||
}
|
||||
|
||||
// match classical versioning
|
||||
if (preg_match('{^v?(\d{1,5}+)(\.\d++)?(\.\d++)?(\.\d++)?' . self::$modifierRegex . '$}i', $version, $matches)) {
|
||||
$version = $matches[1]
|
||||
. (!empty($matches[2]) ? $matches[2] : '.0')
|
||||
. (!empty($matches[3]) ? $matches[3] : '.0')
|
||||
. (!empty($matches[4]) ? $matches[4] : '.0');
|
||||
$index = 5;
|
||||
// match date(time) based versioning
|
||||
} elseif (preg_match('{^v?(\d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3}){0,2})' . self::$modifierRegex . '$}i', $version, $matches)) {
|
||||
$version = (string) preg_replace('{\D}', '.', $matches[1]);
|
||||
$index = 2;
|
||||
}
|
||||
|
||||
// add version modifiers if a version was matched
|
||||
if (isset($index)) {
|
||||
if (!empty($matches[$index])) {
|
||||
if ('stable' === $matches[$index]) {
|
||||
return $version;
|
||||
}
|
||||
$version .= '-' . $this->expandStability($matches[$index]) . (isset($matches[$index + 1]) && '' !== $matches[$index + 1] ? ltrim($matches[$index + 1], '.-') : '');
|
||||
}
|
||||
|
||||
if (!empty($matches[$index + 2])) {
|
||||
$version .= '-dev';
|
||||
}
|
||||
|
||||
return $version;
|
||||
}
|
||||
|
||||
// match dev branches
|
||||
if (preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
|
||||
try {
|
||||
$normalized = $this->normalizeBranch($match[1]);
|
||||
// a branch ending with -dev is only valid if it is numeric
|
||||
// if it gets prefixed with dev- it means the branch name should
|
||||
// have had a dev- prefix already when passed to normalize
|
||||
if (strpos($normalized, 'dev-') === false) {
|
||||
return $normalized;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$extraMessage = '';
|
||||
if (preg_match('{ +as +' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))?$}', $fullVersion)) {
|
||||
$extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version';
|
||||
} elseif (preg_match('{^' . preg_quote($version) . '(?:@(?:'.self::$stabilitiesRegex.'))? +as +}', $fullVersion)) {
|
||||
$extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-';
|
||||
}
|
||||
|
||||
throw new \UnexpectedValueException('Invalid version string "' . $origVersion . '"' . $extraMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract numeric prefix from alias, if it is in numeric format, suitable for version comparison.
|
||||
*
|
||||
* @param string $branch Branch name (e.g. 2.1.x-dev)
|
||||
*
|
||||
* @return string|false Numeric prefix if present (e.g. 2.1.) or false
|
||||
*/
|
||||
public function parseNumericAliasPrefix($branch)
|
||||
{
|
||||
if (preg_match('{^(?P<version>(\d++\\.)*\d++)(?:\.x)?-dev$}i', (string) $branch, $matches)) {
|
||||
return $matches['version'] . '.';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a branch name to be able to perform comparisons on it.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function normalizeBranch($name)
|
||||
{
|
||||
$name = trim((string) $name);
|
||||
|
||||
if (preg_match('{^v?(\d++)(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?$}i', $name, $matches)) {
|
||||
$version = '';
|
||||
for ($i = 1; $i < 5; ++$i) {
|
||||
$version .= isset($matches[$i]) ? str_replace(array('*', 'X'), 'x', $matches[$i]) : '.x';
|
||||
}
|
||||
|
||||
return str_replace('x', '9999999', $version) . '-dev';
|
||||
}
|
||||
|
||||
return 'dev-' . $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a default branch name (i.e. master on git) to 9999999-dev.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @deprecated No need to use this anymore in theory, Composer 2 does not normalize any branch names to 9999999-dev anymore
|
||||
*/
|
||||
public function normalizeDefaultBranch($name)
|
||||
{
|
||||
if ($name === 'dev-master' || $name === 'dev-default' || $name === 'dev-trunk') {
|
||||
return '9999999-dev';
|
||||
}
|
||||
|
||||
return (string) $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a constraint string into MultiConstraint and/or Constraint objects.
|
||||
*
|
||||
* @param string $constraints
|
||||
*
|
||||
* @return ConstraintInterface
|
||||
*/
|
||||
public function parseConstraints($constraints)
|
||||
{
|
||||
$prettyConstraint = (string) $constraints;
|
||||
|
||||
$orConstraints = preg_split('{\s*\|\|?\s*}', trim((string) $constraints));
|
||||
if (false === $orConstraints) {
|
||||
throw new \RuntimeException('Failed to preg_split string: '.$constraints);
|
||||
}
|
||||
$orGroups = array();
|
||||
|
||||
foreach ($orConstraints as $orConstraint) {
|
||||
$andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $orConstraint);
|
||||
if (false === $andConstraints) {
|
||||
throw new \RuntimeException('Failed to preg_split string: '.$orConstraint);
|
||||
}
|
||||
if (\count($andConstraints) > 1) {
|
||||
$constraintObjects = array();
|
||||
foreach ($andConstraints as $andConstraint) {
|
||||
foreach ($this->parseConstraint($andConstraint) as $parsedAndConstraint) {
|
||||
$constraintObjects[] = $parsedAndConstraint;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$constraintObjects = $this->parseConstraint($andConstraints[0]);
|
||||
}
|
||||
|
||||
if (1 === \count($constraintObjects)) {
|
||||
$constraint = $constraintObjects[0];
|
||||
} else {
|
||||
$constraint = new MultiConstraint($constraintObjects);
|
||||
}
|
||||
|
||||
$orGroups[] = $constraint;
|
||||
}
|
||||
|
||||
$parsedConstraint = MultiConstraint::create($orGroups, false);
|
||||
|
||||
$parsedConstraint->setPrettyString($prettyConstraint);
|
||||
|
||||
return $parsedConstraint;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $constraint
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @phpstan-return non-empty-array<ConstraintInterface>
|
||||
*/
|
||||
private function parseConstraint($constraint)
|
||||
{
|
||||
// strip off aliasing
|
||||
if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $constraint, $match)) {
|
||||
$constraint = $match[1];
|
||||
}
|
||||
|
||||
// strip @stability flags, and keep it for later use
|
||||
if (preg_match('{^([^,\s]*?)@(' . self::$stabilitiesRegex . ')$}i', $constraint, $match)) {
|
||||
$constraint = '' !== $match[1] ? $match[1] : '*';
|
||||
if ($match[2] !== 'stable') {
|
||||
$stabilityModifier = $match[2];
|
||||
}
|
||||
}
|
||||
|
||||
// get rid of #refs as those are used by composer only
|
||||
if (preg_match('{^(dev-[^,\s@]+?|[^,\s@]+?\.x-dev)#.+$}i', $constraint, $match)) {
|
||||
$constraint = $match[1];
|
||||
}
|
||||
|
||||
if (preg_match('{^(v)?[xX*](\.[xX*])*$}i', $constraint, $match)) {
|
||||
if (!empty($match[1]) || !empty($match[2])) {
|
||||
return array(new Constraint('>=', '0.0.0.0-dev'));
|
||||
}
|
||||
|
||||
return array(new MatchAllConstraint());
|
||||
}
|
||||
|
||||
$versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?(?:' . self::$modifierRegex . '|\.([xX*][.-]?dev))(?:\+[^\s]+)?';
|
||||
|
||||
// Tilde Range
|
||||
//
|
||||
// Like wildcard constraints, unsuffixed tilde constraints say that they must be greater than the previous
|
||||
// version, to ensure that unstable instances of the current version are allowed. However, if a stability
|
||||
// suffix is added to the constraint, then a >= match on the current version is used instead.
|
||||
if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
|
||||
if (strpos($constraint, '~>') === 0) {
|
||||
throw new \UnexpectedValueException(
|
||||
'Could not parse version constraint ' . $constraint . ': ' .
|
||||
'Invalid operator "~>", you probably meant to use the "~" operator'
|
||||
);
|
||||
}
|
||||
|
||||
// Work out which position in the version we are operating at
|
||||
if (isset($matches[4]) && '' !== $matches[4] && null !== $matches[4]) {
|
||||
$position = 4;
|
||||
} elseif (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
|
||||
$position = 3;
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 1;
|
||||
}
|
||||
|
||||
// when matching 2.x-dev or 3.0.x-dev we have to shift the second or third number, despite no second/third number matching above
|
||||
if (!empty($matches[8])) {
|
||||
$position++;
|
||||
}
|
||||
|
||||
// Calculate the stability suffix
|
||||
$stabilitySuffix = '';
|
||||
if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
|
||||
$stabilitySuffix .= '-dev';
|
||||
}
|
||||
|
||||
$lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
|
||||
$lowerBound = new Constraint('>=', $lowVersion);
|
||||
|
||||
// For upper bound, we increment the position of one more significance,
|
||||
// but highPosition = 0 would be illegal
|
||||
$highPosition = max(1, $position - 1);
|
||||
$highVersion = $this->manipulateVersionString($matches, $highPosition, 1) . '-dev';
|
||||
$upperBound = new Constraint('<', $highVersion);
|
||||
|
||||
return array(
|
||||
$lowerBound,
|
||||
$upperBound,
|
||||
);
|
||||
}
|
||||
|
||||
// Caret Range
|
||||
//
|
||||
// Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple.
|
||||
// In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for
|
||||
// versions 0.X >=0.1.0, and no updates for versions 0.0.X
|
||||
if (preg_match('{^\^' . $versionRegex . '($)}i', $constraint, $matches)) {
|
||||
// Work out which position in the version we are operating at
|
||||
if ('0' !== $matches[1] || '' === $matches[2] || null === $matches[2]) {
|
||||
$position = 1;
|
||||
} elseif ('0' !== $matches[2] || '' === $matches[3] || null === $matches[3]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 3;
|
||||
}
|
||||
|
||||
// Calculate the stability suffix
|
||||
$stabilitySuffix = '';
|
||||
if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
|
||||
$stabilitySuffix .= '-dev';
|
||||
}
|
||||
|
||||
$lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
|
||||
$lowerBound = new Constraint('>=', $lowVersion);
|
||||
|
||||
// For upper bound, we increment the position of one more significance,
|
||||
// but highPosition = 0 would be illegal
|
||||
$highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
|
||||
$upperBound = new Constraint('<', $highVersion);
|
||||
|
||||
return array(
|
||||
$lowerBound,
|
||||
$upperBound,
|
||||
);
|
||||
}
|
||||
|
||||
// X Range
|
||||
//
|
||||
// Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple.
|
||||
// A partial version range is treated as an X-Range, so the special character is in fact optional.
|
||||
if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) {
|
||||
if (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
|
||||
$position = 3;
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 1;
|
||||
}
|
||||
|
||||
$lowVersion = $this->manipulateVersionString($matches, $position) . '-dev';
|
||||
$highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
|
||||
|
||||
if ($lowVersion === '0.0.0.0-dev') {
|
||||
return array(new Constraint('<', $highVersion));
|
||||
}
|
||||
|
||||
return array(
|
||||
new Constraint('>=', $lowVersion),
|
||||
new Constraint('<', $highVersion),
|
||||
);
|
||||
}
|
||||
|
||||
// Hyphen Range
|
||||
//
|
||||
// Specifies an inclusive set. If a partial version is provided as the first version in the inclusive range,
|
||||
// then the missing pieces are replaced with zeroes. If a partial version is provided as the second version in
|
||||
// the inclusive range, then all versions that start with the supplied parts of the tuple are accepted, but
|
||||
// nothing that would be greater than the provided tuple parts.
|
||||
if (preg_match('{^(?P<from>' . $versionRegex . ') +- +(?P<to>' . $versionRegex . ')($)}i', $constraint, $matches)) {
|
||||
// Calculate the stability suffix
|
||||
$lowStabilitySuffix = '';
|
||||
if (empty($matches[6]) && empty($matches[8]) && empty($matches[9])) {
|
||||
$lowStabilitySuffix = '-dev';
|
||||
}
|
||||
|
||||
$lowVersion = $this->normalize($matches['from']);
|
||||
$lowerBound = new Constraint('>=', $lowVersion . $lowStabilitySuffix);
|
||||
|
||||
$empty = function ($x) {
|
||||
return ($x === 0 || $x === '0') ? false : empty($x);
|
||||
};
|
||||
|
||||
if ((!$empty($matches[12]) && !$empty($matches[13])) || !empty($matches[15]) || !empty($matches[17]) || !empty($matches[18])) {
|
||||
$highVersion = $this->normalize($matches['to']);
|
||||
$upperBound = new Constraint('<=', $highVersion);
|
||||
} else {
|
||||
$highMatch = array('', $matches[11], $matches[12], $matches[13], $matches[14]);
|
||||
|
||||
// validate to version
|
||||
$this->normalize($matches['to']);
|
||||
|
||||
$highVersion = $this->manipulateVersionString($highMatch, $empty($matches[12]) ? 1 : 2, 1) . '-dev';
|
||||
$upperBound = new Constraint('<', $highVersion);
|
||||
}
|
||||
|
||||
return array(
|
||||
$lowerBound,
|
||||
$upperBound,
|
||||
);
|
||||
}
|
||||
|
||||
// Basic Comparators
|
||||
if (preg_match('{^(<>|!=|>=?|<=?|==?)?\s*(.*)}', $constraint, $matches)) {
|
||||
try {
|
||||
try {
|
||||
$version = $this->normalize($matches[2]);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
// recover from an invalid constraint like foobar-dev which should be dev-foobar
|
||||
// except if the constraint uses a known operator, in which case it must be a parse error
|
||||
if (substr($matches[2], -4) === '-dev' && preg_match('{^[0-9a-zA-Z-./]+$}', $matches[2])) {
|
||||
$version = $this->normalize('dev-'.substr($matches[2], 0, -4));
|
||||
} else {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$op = $matches[1] ?: '=';
|
||||
|
||||
if ($op !== '==' && $op !== '=' && !empty($stabilityModifier) && self::parseStability($version) === 'stable') {
|
||||
$version .= '-' . $stabilityModifier;
|
||||
} elseif ('<' === $op || '>=' === $op) {
|
||||
if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
|
||||
if (strpos($matches[2], 'dev-') !== 0) {
|
||||
$version .= '-dev';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array(new Constraint($matches[1] ?: '=', $version));
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$message = 'Could not parse version constraint ' . $constraint;
|
||||
if (isset($e)) {
|
||||
$message .= ': ' . $e->getMessage();
|
||||
}
|
||||
|
||||
throw new \UnexpectedValueException($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increment, decrement, or simply pad a version number.
|
||||
*
|
||||
* Support function for {@link parseConstraint()}
|
||||
*
|
||||
* @param array $matches Array with version parts in array indexes 1,2,3,4
|
||||
* @param int $position 1,2,3,4 - which segment of the version to increment/decrement
|
||||
* @param int $increment
|
||||
* @param string $pad The string to pad version parts after $position
|
||||
*
|
||||
* @return string|null The new version
|
||||
*
|
||||
* @phpstan-param string[] $matches
|
||||
*/
|
||||
private function manipulateVersionString(array $matches, $position, $increment = 0, $pad = '0')
|
||||
{
|
||||
for ($i = 4; $i > 0; --$i) {
|
||||
if ($i > $position) {
|
||||
$matches[$i] = $pad;
|
||||
} elseif ($i === $position && $increment) {
|
||||
$matches[$i] += $increment;
|
||||
// If $matches[$i] was 0, carry the decrement
|
||||
if ($matches[$i] < 0) {
|
||||
$matches[$i] = $pad;
|
||||
--$position;
|
||||
|
||||
// Return null on a carry overflow
|
||||
if ($i === 1) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $matches[1] . '.' . $matches[2] . '.' . $matches[3] . '.' . $matches[4];
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand shorthand stability string to long version.
|
||||
*
|
||||
* @param string $stability
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function expandStability($stability)
|
||||
{
|
||||
$stability = strtolower($stability);
|
||||
|
||||
switch ($stability) {
|
||||
case 'a':
|
||||
return 'alpha';
|
||||
case 'b':
|
||||
return 'beta';
|
||||
case 'p':
|
||||
case 'pl':
|
||||
return 'patch';
|
||||
case 'rc':
|
||||
return 'RC';
|
||||
default:
|
||||
return $stability;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
public/kirby/vendor/filp/whoops/LICENSE.md
vendored
19
public/kirby/vendor/filp/whoops/LICENSE.md
vendored
|
|
@ -1,19 +0,0 @@
|
|||
# The MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
45
public/kirby/vendor/filp/whoops/composer.json
vendored
45
public/kirby/vendor/filp/whoops/composer.json
vendored
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"name": "filp/whoops",
|
||||
"license": "MIT",
|
||||
"description": "php error handling for cool kids",
|
||||
"keywords": ["library", "error", "handling", "exception", "whoops", "throwable"],
|
||||
"homepage": "https://filp.github.io/whoops/",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Filipe Dobreira",
|
||||
"homepage": "https://github.com/filp",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"test": "phpunit --testdox tests"
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9 || ^7.0 || ^8.0",
|
||||
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
|
||||
"whoops/soap": "Formats errors as SOAP responses"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Whoops\\": "src/Whoops/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Whoops\\": "tests/Whoops/"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.7-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Exception;
|
||||
|
||||
use ErrorException as BaseErrorException;
|
||||
|
||||
/**
|
||||
* Wraps ErrorException; mostly used for typing (at least now)
|
||||
* to easily cleanup the stack trace of redundant info.
|
||||
*/
|
||||
class ErrorException extends BaseErrorException
|
||||
{
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Exception;
|
||||
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
|
||||
class Formatter
|
||||
{
|
||||
/**
|
||||
* Returns all basic information about the exception in a simple array
|
||||
* for further convertion to other languages
|
||||
* @param InspectorInterface $inspector
|
||||
* @param bool $shouldAddTrace
|
||||
* @param array<callable> $frameFilters
|
||||
* @return array
|
||||
*/
|
||||
public static function formatExceptionAsDataArray(InspectorInterface $inspector, $shouldAddTrace, array $frameFilters = [])
|
||||
{
|
||||
$exception = $inspector->getException();
|
||||
$response = [
|
||||
'type' => get_class($exception),
|
||||
'message' => $exception->getMessage(),
|
||||
'code' => $exception->getCode(),
|
||||
'file' => $exception->getFile(),
|
||||
'line' => $exception->getLine(),
|
||||
];
|
||||
|
||||
if ($shouldAddTrace) {
|
||||
$frames = $inspector->getFrames($frameFilters);
|
||||
$frameData = [];
|
||||
|
||||
foreach ($frames as $frame) {
|
||||
/** @var Frame $frame */
|
||||
$frameData[] = [
|
||||
'file' => $frame->getFile(),
|
||||
'line' => $frame->getLine(),
|
||||
'function' => $frame->getFunction(),
|
||||
'class' => $frame->getClass(),
|
||||
'args' => $frame->getArgs(),
|
||||
];
|
||||
}
|
||||
|
||||
$response['trace'] = $frameData;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public static function formatExceptionPlain(InspectorInterface $inspector)
|
||||
{
|
||||
$message = $inspector->getException()->getMessage();
|
||||
$frames = $inspector->getFrames();
|
||||
|
||||
$plain = $inspector->getExceptionName();
|
||||
$plain .= ' thrown with message "';
|
||||
$plain .= $message;
|
||||
$plain .= '"'."\n\n";
|
||||
|
||||
$plain .= "Stacktrace:\n";
|
||||
foreach ($frames as $i => $frame) {
|
||||
$plain .= "#". (count($frames) - $i - 1). " ";
|
||||
$plain .= $frame->getClass() ?: '';
|
||||
$plain .= $frame->getClass() && $frame->getFunction() ? ":" : "";
|
||||
$plain .= $frame->getFunction() ?: '';
|
||||
$plain .= ' in ';
|
||||
$plain .= ($frame->getFile() ?: '<#unknown>');
|
||||
$plain .= ':';
|
||||
$plain .= (int) $frame->getLine(). "\n";
|
||||
}
|
||||
|
||||
return $plain;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,311 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Exception;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Serializable;
|
||||
|
||||
class Frame implements Serializable
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $frame;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fileContentsCache;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
protected $comments = [];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $application;
|
||||
|
||||
public function __construct(array $frame)
|
||||
{
|
||||
$this->frame = $frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $shortened
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFile($shortened = false)
|
||||
{
|
||||
if (empty($this->frame['file'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$file = $this->frame['file'];
|
||||
|
||||
// Check if this frame occurred within an eval().
|
||||
// @todo: This can be made more reliable by checking if we've entered
|
||||
// eval() in a previous trace, but will need some more work on the upper
|
||||
// trace collector(s).
|
||||
if (preg_match('/^(.*)\((\d+)\) : (?:eval\(\)\'d|assert) code$/', $file, $matches)) {
|
||||
$file = $this->frame['file'] = $matches[1];
|
||||
$this->frame['line'] = (int) $matches[2];
|
||||
}
|
||||
|
||||
if ($shortened && is_string($file)) {
|
||||
// Replace the part of the path that all frames have in common, and add 'soft hyphens' for smoother line-breaks.
|
||||
$dirname = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__))))));
|
||||
if ($dirname !== '/') {
|
||||
$file = str_replace($dirname, "…", $file);
|
||||
}
|
||||
$file = str_replace("/", "/­", $file);
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getLine()
|
||||
{
|
||||
return isset($this->frame['line']) ? $this->frame['line'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
return isset($this->frame['class']) ? $this->frame['class'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFunction()
|
||||
{
|
||||
return isset($this->frame['function']) ? $this->frame['function'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getArgs()
|
||||
{
|
||||
return isset($this->frame['args']) ? (array) $this->frame['args'] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full contents of the file for this frame,
|
||||
* if it's known.
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFileContents()
|
||||
{
|
||||
if ($this->fileContentsCache === null && $filePath = $this->getFile()) {
|
||||
// Leave the stage early when 'Unknown' or '[internal]' is passed
|
||||
// this would otherwise raise an exception when
|
||||
// open_basedir is enabled.
|
||||
if ($filePath === "Unknown" || $filePath === '[internal]') {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->fileContentsCache = file_get_contents($filePath);
|
||||
} catch (ErrorException $exception) {
|
||||
// Internal file paths of PHP extensions cannot be opened
|
||||
}
|
||||
}
|
||||
|
||||
return $this->fileContentsCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a comment to this frame, that can be received and
|
||||
* used by other handlers. For example, the PrettyPage handler
|
||||
* can attach these comments under the code for each frame.
|
||||
*
|
||||
* An interesting use for this would be, for example, code analysis
|
||||
* & annotations.
|
||||
*
|
||||
* @param string $comment
|
||||
* @param string $context Optional string identifying the origin of the comment
|
||||
*/
|
||||
public function addComment($comment, $context = 'global')
|
||||
{
|
||||
$this->comments[] = [
|
||||
'comment' => $comment,
|
||||
'context' => $context,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all comments for this frame. Optionally allows
|
||||
* a filter to only retrieve comments from a specific
|
||||
* context.
|
||||
*
|
||||
* @param string $filter
|
||||
* @return array[]
|
||||
*/
|
||||
public function getComments($filter = null)
|
||||
{
|
||||
$comments = $this->comments;
|
||||
|
||||
if ($filter !== null) {
|
||||
$comments = array_filter($comments, function ($c) use ($filter) {
|
||||
return $c['context'] == $filter;
|
||||
});
|
||||
}
|
||||
|
||||
return $comments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the array containing the raw frame data from which
|
||||
* this Frame object was built
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getRawFrame()
|
||||
{
|
||||
return $this->frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the contents of the file for this frame as an
|
||||
* array of lines, and optionally as a clamped range of lines.
|
||||
*
|
||||
* NOTE: lines are 0-indexed
|
||||
*
|
||||
* @example
|
||||
* Get all lines for this file
|
||||
* $frame->getFileLines(); // => array( 0 => '<?php', 1 => '...', ...)
|
||||
* @example
|
||||
* Get one line for this file, starting at line 10 (zero-indexed, remember!)
|
||||
* $frame->getFileLines(9, 1); // array( 9 => '...' )
|
||||
*
|
||||
* @throws InvalidArgumentException if $length is less than or equal to 0
|
||||
* @param int $start
|
||||
* @param int $length
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getFileLines($start = 0, $length = null)
|
||||
{
|
||||
if (null !== ($contents = $this->getFileContents())) {
|
||||
$lines = explode("\n", $contents);
|
||||
|
||||
// Get a subset of lines from $start to $end
|
||||
if ($length !== null) {
|
||||
$start = (int) $start;
|
||||
$length = (int) $length;
|
||||
if ($start < 0) {
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
if ($length <= 0) {
|
||||
throw new InvalidArgumentException(
|
||||
"\$length($length) cannot be lower or equal to 0"
|
||||
);
|
||||
}
|
||||
|
||||
$lines = array_slice($lines, $start, $length, true);
|
||||
}
|
||||
|
||||
return $lines;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements the Serializable interface, with special
|
||||
* steps to also save the existing comments.
|
||||
*
|
||||
* @see Serializable::serialize
|
||||
* @return string
|
||||
*/
|
||||
public function serialize()
|
||||
{
|
||||
$frame = $this->frame;
|
||||
if (!empty($this->comments)) {
|
||||
$frame['_comments'] = $this->comments;
|
||||
}
|
||||
|
||||
return serialize($frame);
|
||||
}
|
||||
|
||||
public function __serialize()
|
||||
{
|
||||
$frame = $this->frame;
|
||||
if (!empty($this->comments)) {
|
||||
$frame['_comments'] = $this->comments;
|
||||
}
|
||||
return $frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unserializes the frame data, while also preserving
|
||||
* any existing comment data.
|
||||
*
|
||||
* @see Serializable::unserialize
|
||||
* @param string $serializedFrame
|
||||
*/
|
||||
public function unserialize($serializedFrame)
|
||||
{
|
||||
$frame = unserialize($serializedFrame);
|
||||
|
||||
if (!empty($frame['_comments'])) {
|
||||
$this->comments = $frame['_comments'];
|
||||
unset($frame['_comments']);
|
||||
}
|
||||
|
||||
$this->frame = $frame;
|
||||
}
|
||||
|
||||
public function __unserialize($frame)
|
||||
{
|
||||
if (!empty($frame['_comments'])) {
|
||||
$this->comments = $frame['_comments'];
|
||||
unset($frame['_comments']);
|
||||
}
|
||||
|
||||
$this->frame = $frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares Frame against one another
|
||||
* @param Frame $frame
|
||||
* @return bool
|
||||
*/
|
||||
public function equals(Frame $frame)
|
||||
{
|
||||
if (!$this->getFile() || $this->getFile() === 'Unknown' || !$this->getLine()) {
|
||||
return false;
|
||||
}
|
||||
return $frame->getFile() === $this->getFile() && $frame->getLine() === $this->getLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this frame belongs to the application or not.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isApplication()
|
||||
{
|
||||
return $this->application;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark as an frame belonging to the application.
|
||||
*
|
||||
* @param boolean $application
|
||||
*/
|
||||
public function setApplication($application)
|
||||
{
|
||||
$this->application = $application;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Exception;
|
||||
|
||||
use ArrayAccess;
|
||||
use ArrayIterator;
|
||||
use Countable;
|
||||
use IteratorAggregate;
|
||||
use ReturnTypeWillChange;
|
||||
use Serializable;
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* Exposes a fluent interface for dealing with an ordered list
|
||||
* of stack-trace frames.
|
||||
*/
|
||||
class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, Countable
|
||||
{
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $frames;
|
||||
|
||||
public function __construct(array $frames)
|
||||
{
|
||||
$this->frames = array_map(function ($frame) {
|
||||
return new Frame($frame);
|
||||
}, $frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters frames using a callable, returns the same FrameCollection
|
||||
*
|
||||
* @param callable $callable
|
||||
* @return FrameCollection
|
||||
*/
|
||||
public function filter($callable)
|
||||
{
|
||||
$this->frames = array_values(array_filter($this->frames, $callable));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Map the collection of frames
|
||||
*
|
||||
* @param callable $callable
|
||||
* @return FrameCollection
|
||||
*/
|
||||
public function map($callable)
|
||||
{
|
||||
// Contain the map within a higher-order callable
|
||||
// that enforces type-correctness for the $callable
|
||||
$this->frames = array_map(function ($frame) use ($callable) {
|
||||
$frame = call_user_func($callable, $frame);
|
||||
|
||||
if (!$frame instanceof Frame) {
|
||||
throw new UnexpectedValueException(
|
||||
"Callable to " . __CLASS__ . "::map must return a Frame object"
|
||||
);
|
||||
}
|
||||
|
||||
return $frame;
|
||||
}, $this->frames);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with all frames, does not affect
|
||||
* the internal array.
|
||||
*
|
||||
* @todo If this gets any more complex than this,
|
||||
* have getIterator use this method.
|
||||
* @see FrameCollection::getIterator
|
||||
* @return array
|
||||
*/
|
||||
public function getArray()
|
||||
{
|
||||
return $this->frames;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IteratorAggregate::getIterator
|
||||
* @return ArrayIterator
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
{
|
||||
return new ArrayIterator($this->frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ArrayAccess::offsetExists
|
||||
* @param int $offset
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->frames[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ArrayAccess::offsetGet
|
||||
* @param int $offset
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->frames[$offset];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ArrayAccess::offsetSet
|
||||
* @param int $offset
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
throw new \Exception(__CLASS__ . ' is read only');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ArrayAccess::offsetUnset
|
||||
* @param int $offset
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
throw new \Exception(__CLASS__ . ' is read only');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Countable::count
|
||||
* @return int
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
return count($this->frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the frames that belongs to the application.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function countIsApplication()
|
||||
{
|
||||
return count(array_filter($this->frames, function (Frame $f) {
|
||||
return $f->isApplication();
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Serializable::serialize
|
||||
* @return string
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function serialize()
|
||||
{
|
||||
return serialize($this->frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Serializable::unserialize
|
||||
* @param string $serializedFrames
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function unserialize($serializedFrames)
|
||||
{
|
||||
$this->frames = unserialize($serializedFrames);
|
||||
}
|
||||
|
||||
public function __serialize()
|
||||
{
|
||||
return $this->frames;
|
||||
}
|
||||
|
||||
public function __unserialize(array $serializedFrames)
|
||||
{
|
||||
$this->frames = $serializedFrames;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Frame[] $frames Array of Frame instances, usually from $e->getPrevious()
|
||||
*/
|
||||
public function prependFrames(array $frames)
|
||||
{
|
||||
$this->frames = array_merge($frames, $this->frames);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the innermost part of stack trace that is not the same as that of outer exception
|
||||
*
|
||||
* @param FrameCollection $parentFrames Outer exception frames to compare tail against
|
||||
* @return Frame[]
|
||||
*/
|
||||
public function topDiff(FrameCollection $parentFrames)
|
||||
{
|
||||
$diff = $this->frames;
|
||||
|
||||
$parentFrames = $parentFrames->getArray();
|
||||
$p = count($parentFrames)-1;
|
||||
|
||||
for ($i = count($diff)-1; $i >= 0 && $p >= 0; $i--) {
|
||||
/** @var Frame $tailFrame */
|
||||
$tailFrame = $diff[$i];
|
||||
if ($tailFrame->equals($parentFrames[$p])) {
|
||||
unset($diff[$i]);
|
||||
}
|
||||
$p--;
|
||||
}
|
||||
return $diff;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,341 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Exception;
|
||||
|
||||
use Whoops\Inspector\InspectorFactory;
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
use Whoops\Util\Misc;
|
||||
|
||||
class Inspector implements InspectorInterface
|
||||
{
|
||||
/**
|
||||
* @var \Throwable
|
||||
*/
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @var \Whoops\Exception\FrameCollection
|
||||
*/
|
||||
private $frames;
|
||||
|
||||
/**
|
||||
* @var \Whoops\Exception\Inspector
|
||||
*/
|
||||
private $previousExceptionInspector;
|
||||
|
||||
/**
|
||||
* @var \Throwable[]
|
||||
*/
|
||||
private $previousExceptions;
|
||||
|
||||
/**
|
||||
* @var \Whoops\Inspector\InspectorFactoryInterface|null
|
||||
*/
|
||||
protected $inspectorFactory;
|
||||
|
||||
/**
|
||||
* @param \Throwable $exception The exception to inspect
|
||||
* @param \Whoops\Inspector\InspectorFactoryInterface $factory
|
||||
*/
|
||||
public function __construct($exception, $factory = null)
|
||||
{
|
||||
$this->exception = $exception;
|
||||
$this->inspectorFactory = $factory ?: new InspectorFactory();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Throwable
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
return $this->exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExceptionName()
|
||||
{
|
||||
return get_class($this->exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExceptionMessage()
|
||||
{
|
||||
return $this->extractDocrefUrl($this->exception->getMessage())['message'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPreviousExceptionMessages()
|
||||
{
|
||||
return array_map(function ($prev) {
|
||||
/** @var \Throwable $prev */
|
||||
return $this->extractDocrefUrl($prev->getMessage())['message'];
|
||||
}, $this->getPreviousExceptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int[]
|
||||
*/
|
||||
public function getPreviousExceptionCodes()
|
||||
{
|
||||
return array_map(function ($prev) {
|
||||
/** @var \Throwable $prev */
|
||||
return $prev->getCode();
|
||||
}, $this->getPreviousExceptions());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a url to the php-manual related to the underlying error - when available.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getExceptionDocrefUrl()
|
||||
{
|
||||
return $this->extractDocrefUrl($this->exception->getMessage())['url'];
|
||||
}
|
||||
|
||||
private function extractDocrefUrl($message)
|
||||
{
|
||||
$docref = [
|
||||
'message' => $message,
|
||||
'url' => null,
|
||||
];
|
||||
|
||||
// php embbeds urls to the manual into the Exception message with the following ini-settings defined
|
||||
// http://php.net/manual/en/errorfunc.configuration.php#ini.docref-root
|
||||
if (!ini_get('html_errors') || !ini_get('docref_root')) {
|
||||
return $docref;
|
||||
}
|
||||
|
||||
$pattern = "/\[<a href='([^']+)'>(?:[^<]+)<\/a>\]/";
|
||||
if (preg_match($pattern, $message, $matches)) {
|
||||
// -> strip those automatically generated links from the exception message
|
||||
$docref['message'] = preg_replace($pattern, '', $message, 1);
|
||||
$docref['url'] = $matches[1];
|
||||
}
|
||||
|
||||
return $docref;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the wrapped Exception has a previous Exception?
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreviousException()
|
||||
{
|
||||
return $this->previousExceptionInspector || $this->exception->getPrevious();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an Inspector for a previous Exception, if any.
|
||||
* @todo Clean this up a bit, cache stuff a bit better.
|
||||
* @return Inspector
|
||||
*/
|
||||
public function getPreviousExceptionInspector()
|
||||
{
|
||||
if ($this->previousExceptionInspector === null) {
|
||||
$previousException = $this->exception->getPrevious();
|
||||
|
||||
if ($previousException) {
|
||||
$this->previousExceptionInspector = $this->inspectorFactory->create($previousException);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->previousExceptionInspector;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of all previous exceptions for this inspector's exception
|
||||
* @return \Throwable[]
|
||||
*/
|
||||
public function getPreviousExceptions()
|
||||
{
|
||||
if ($this->previousExceptions === null) {
|
||||
$this->previousExceptions = [];
|
||||
|
||||
$prev = $this->exception->getPrevious();
|
||||
while ($prev !== null) {
|
||||
$this->previousExceptions[] = $prev;
|
||||
$prev = $prev->getPrevious();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->previousExceptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an iterator for the inspected exception's
|
||||
* frames.
|
||||
*
|
||||
* @param array<callable> $frameFilters
|
||||
*
|
||||
* @return \Whoops\Exception\FrameCollection
|
||||
*/
|
||||
public function getFrames(array $frameFilters = [])
|
||||
{
|
||||
if ($this->frames === null) {
|
||||
$frames = $this->getTrace($this->exception);
|
||||
|
||||
// Fill empty line/file info for call_user_func_array usages (PHP Bug #44428)
|
||||
foreach ($frames as $k => $frame) {
|
||||
if (empty($frame['file'])) {
|
||||
// Default values when file and line are missing
|
||||
$file = '[internal]';
|
||||
$line = 0;
|
||||
|
||||
$next_frame = !empty($frames[$k + 1]) ? $frames[$k + 1] : [];
|
||||
|
||||
if ($this->isValidNextFrame($next_frame)) {
|
||||
$file = $next_frame['file'];
|
||||
$line = $next_frame['line'];
|
||||
}
|
||||
|
||||
$frames[$k]['file'] = $file;
|
||||
$frames[$k]['line'] = $line;
|
||||
}
|
||||
}
|
||||
|
||||
// Find latest non-error handling frame index ($i) used to remove error handling frames
|
||||
$i = 0;
|
||||
foreach ($frames as $k => $frame) {
|
||||
if ($frame['file'] == $this->exception->getFile() && $frame['line'] == $this->exception->getLine()) {
|
||||
$i = $k;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove error handling frames
|
||||
if ($i > 0) {
|
||||
array_splice($frames, 0, $i);
|
||||
}
|
||||
|
||||
$firstFrame = $this->getFrameFromException($this->exception);
|
||||
array_unshift($frames, $firstFrame);
|
||||
|
||||
$this->frames = new FrameCollection($frames);
|
||||
|
||||
if ($previousInspector = $this->getPreviousExceptionInspector()) {
|
||||
// Keep outer frame on top of the inner one
|
||||
$outerFrames = $this->frames;
|
||||
$newFrames = clone $previousInspector->getFrames();
|
||||
// I assume it will always be set, but let's be safe
|
||||
if (isset($newFrames[0])) {
|
||||
$newFrames[0]->addComment(
|
||||
$previousInspector->getExceptionMessage(),
|
||||
'Exception message:'
|
||||
);
|
||||
}
|
||||
$newFrames->prependFrames($outerFrames->topDiff($newFrames));
|
||||
$this->frames = $newFrames;
|
||||
}
|
||||
|
||||
// Apply frame filters callbacks on the frames stack
|
||||
if (!empty($frameFilters)) {
|
||||
foreach ($frameFilters as $filterCallback) {
|
||||
$this->frames->filter($filterCallback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->frames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the backtrace from an exception.
|
||||
*
|
||||
* If xdebug is installed
|
||||
*
|
||||
* @param \Throwable $e
|
||||
* @return array
|
||||
*/
|
||||
protected function getTrace($e)
|
||||
{
|
||||
$traces = $e->getTrace();
|
||||
|
||||
// Get trace from xdebug if enabled, failure exceptions only trace to the shutdown handler by default
|
||||
if (!$e instanceof \ErrorException) {
|
||||
return $traces;
|
||||
}
|
||||
|
||||
if (!Misc::isLevelFatal($e->getSeverity())) {
|
||||
return $traces;
|
||||
}
|
||||
|
||||
if (!extension_loaded('xdebug') || !function_exists('xdebug_is_enabled') || !xdebug_is_enabled()) {
|
||||
return $traces;
|
||||
}
|
||||
|
||||
// Use xdebug to get the full stack trace and remove the shutdown handler stack trace
|
||||
$stack = array_reverse(xdebug_get_function_stack());
|
||||
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
|
||||
$traces = array_diff_key($stack, $trace);
|
||||
|
||||
return $traces;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an exception, generates an array in the format
|
||||
* generated by Exception::getTrace()
|
||||
* @param \Throwable $exception
|
||||
* @return array
|
||||
*/
|
||||
protected function getFrameFromException($exception)
|
||||
{
|
||||
return [
|
||||
'file' => $exception->getFile(),
|
||||
'line' => $exception->getLine(),
|
||||
'class' => get_class($exception),
|
||||
'args' => [
|
||||
$exception->getMessage(),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an error, generates an array in the format
|
||||
* generated by ErrorException
|
||||
* @param ErrorException $exception
|
||||
* @return array
|
||||
*/
|
||||
protected function getFrameFromError(ErrorException $exception)
|
||||
{
|
||||
return [
|
||||
'file' => $exception->getFile(),
|
||||
'line' => $exception->getLine(),
|
||||
'class' => null,
|
||||
'args' => [],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the frame can be used to fill in previous frame's missing info
|
||||
* happens for call_user_func and call_user_func_array usages (PHP Bug #44428)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isValidNextFrame(array $frame)
|
||||
{
|
||||
if (empty($frame['file'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($frame['line'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($frame['function']) || !stristr($frame['function'], 'call_user_func')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Wrapper for Closures passed as handlers. Can be used
|
||||
* directly, or will be instantiated automagically by Whoops\Run
|
||||
* if passed to Run::pushHandler
|
||||
*/
|
||||
class CallbackHandler extends Handler
|
||||
{
|
||||
/**
|
||||
* @var callable
|
||||
*/
|
||||
protected $callable;
|
||||
|
||||
/**
|
||||
* @throws InvalidArgumentException If argument is not callable
|
||||
* @param callable $callable
|
||||
*/
|
||||
public function __construct($callable)
|
||||
{
|
||||
if (!is_callable($callable)) {
|
||||
throw new InvalidArgumentException(
|
||||
'Argument to ' . __METHOD__ . ' must be valid callable'
|
||||
);
|
||||
}
|
||||
|
||||
$this->callable = $callable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$exception = $this->getException();
|
||||
$inspector = $this->getInspector();
|
||||
$run = $this->getRun();
|
||||
$callable = $this->callable;
|
||||
|
||||
// invoke the callable directly, to get simpler stacktraces (in comparison to call_user_func).
|
||||
// this assumes that $callable is a properly typed php-callable, which we check in __construct().
|
||||
return $callable($exception, $inspector, $run);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
/**
|
||||
* Abstract implementation of a Handler.
|
||||
*/
|
||||
abstract class Handler implements HandlerInterface
|
||||
{
|
||||
/*
|
||||
Return constants that can be returned from Handler::handle
|
||||
to message the handler walker.
|
||||
*/
|
||||
const DONE = 0x10; // returning this is optional, only exists for
|
||||
// semantic purposes
|
||||
/**
|
||||
* The Handler has handled the Throwable in some way, and wishes to skip any other Handler.
|
||||
* Execution will continue.
|
||||
*/
|
||||
const LAST_HANDLER = 0x20;
|
||||
/**
|
||||
* The Handler has handled the Throwable in some way, and wishes to quit/stop execution
|
||||
*/
|
||||
const QUIT = 0x30;
|
||||
|
||||
/**
|
||||
* @var RunInterface
|
||||
*/
|
||||
private $run;
|
||||
|
||||
/**
|
||||
* @var InspectorInterface $inspector
|
||||
*/
|
||||
private $inspector;
|
||||
|
||||
/**
|
||||
* @var \Throwable $exception
|
||||
*/
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @param RunInterface $run
|
||||
*/
|
||||
public function setRun(RunInterface $run)
|
||||
{
|
||||
$this->run = $run;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return RunInterface
|
||||
*/
|
||||
protected function getRun()
|
||||
{
|
||||
return $this->run;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param InspectorInterface $inspector
|
||||
*/
|
||||
public function setInspector(InspectorInterface $inspector)
|
||||
{
|
||||
$this->inspector = $inspector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return InspectorInterface
|
||||
*/
|
||||
protected function getInspector()
|
||||
{
|
||||
return $this->inspector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $exception
|
||||
*/
|
||||
public function setException($exception)
|
||||
{
|
||||
$this->exception = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Throwable
|
||||
*/
|
||||
protected function getException()
|
||||
{
|
||||
return $this->exception;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Inspector\InspectorInterface;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
interface HandlerInterface
|
||||
{
|
||||
/**
|
||||
* @return int|null A handler may return nothing, or a Handler::HANDLE_* constant
|
||||
*/
|
||||
public function handle();
|
||||
|
||||
/**
|
||||
* @param RunInterface $run
|
||||
* @return void
|
||||
*/
|
||||
public function setRun(RunInterface $run);
|
||||
|
||||
/**
|
||||
* @param \Throwable $exception
|
||||
* @return void
|
||||
*/
|
||||
public function setException($exception);
|
||||
|
||||
/**
|
||||
* @param InspectorInterface $inspector
|
||||
* @return void
|
||||
*/
|
||||
public function setInspector(InspectorInterface $inspector);
|
||||
}
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Exception\Formatter;
|
||||
|
||||
/**
|
||||
* Catches an exception and converts it to a JSON
|
||||
* response. Additionally can also return exception
|
||||
* frames for consumption by an API.
|
||||
*/
|
||||
class JsonResponseHandler extends Handler
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $returnFrames = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $jsonApi = false;
|
||||
|
||||
/**
|
||||
* Returns errors[[]] instead of error[] to be in compliance with the json:api spec
|
||||
* @param bool $jsonApi Default is false
|
||||
* @return static
|
||||
*/
|
||||
public function setJsonApi($jsonApi = false)
|
||||
{
|
||||
$this->jsonApi = (bool) $jsonApi;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool|null $returnFrames
|
||||
* @return bool|static
|
||||
*/
|
||||
public function addTraceToOutput($returnFrames = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->returnFrames;
|
||||
}
|
||||
|
||||
$this->returnFrames = (bool) $returnFrames;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
if ($this->jsonApi === true) {
|
||||
$response = [
|
||||
'errors' => [
|
||||
Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
]
|
||||
];
|
||||
} else {
|
||||
$response = [
|
||||
'error' => Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
echo json_encode($response, defined('JSON_PARTIAL_OUTPUT_ON_ERROR') ? JSON_PARTIAL_OUTPUT_ON_ERROR : 0);
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function contentType()
|
||||
{
|
||||
return 'application/json';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,359 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
* Plaintext handler for command line and logs.
|
||||
* @author Pierre-Yves Landuré <https://howto.biapy.com/>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Whoops\Exception\Frame;
|
||||
|
||||
/**
|
||||
* Handler outputing plaintext error messages. Can be used
|
||||
* directly, or will be instantiated automagically by Whoops\Run
|
||||
* if passed to Run::pushHandler
|
||||
*/
|
||||
class PlainTextHandler extends Handler
|
||||
{
|
||||
const VAR_DUMP_PREFIX = ' | ';
|
||||
|
||||
/**
|
||||
* @var \Psr\Log\LoggerInterface
|
||||
*/
|
||||
protected $logger;
|
||||
|
||||
/**
|
||||
* @var callable
|
||||
*/
|
||||
protected $dumper;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $addTraceToOutput = true;
|
||||
|
||||
/**
|
||||
* @var bool|integer
|
||||
*/
|
||||
private $addTraceFunctionArgsToOutput = false;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $traceFunctionArgsOutputLimit = 1024;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $addPreviousToOutput = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $loggerOnly = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @throws InvalidArgumentException If argument is not null or a LoggerInterface
|
||||
* @param \Psr\Log\LoggerInterface|null $logger
|
||||
*/
|
||||
public function __construct($logger = null)
|
||||
{
|
||||
$this->setLogger($logger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the output logger interface.
|
||||
* @throws InvalidArgumentException If argument is not null or a LoggerInterface
|
||||
* @param \Psr\Log\LoggerInterface|null $logger
|
||||
*/
|
||||
public function setLogger($logger = null)
|
||||
{
|
||||
if (! (is_null($logger)
|
||||
|| $logger instanceof LoggerInterface)) {
|
||||
throw new InvalidArgumentException(
|
||||
'Argument to ' . __METHOD__ .
|
||||
" must be a valid Logger Interface (aka. Monolog), " .
|
||||
get_class($logger) . ' given.'
|
||||
);
|
||||
}
|
||||
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Psr\Log\LoggerInterface|null
|
||||
*/
|
||||
public function getLogger()
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set var dumper callback function.
|
||||
*
|
||||
* @param callable $dumper
|
||||
* @return static
|
||||
*/
|
||||
public function setDumper(callable $dumper)
|
||||
{
|
||||
$this->dumper = $dumper;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add error trace to output.
|
||||
* @param bool|null $addTraceToOutput
|
||||
* @return bool|static
|
||||
*/
|
||||
public function addTraceToOutput($addTraceToOutput = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->addTraceToOutput;
|
||||
}
|
||||
|
||||
$this->addTraceToOutput = (bool) $addTraceToOutput;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add previous exceptions to output.
|
||||
* @param bool|null $addPreviousToOutput
|
||||
* @return bool|static
|
||||
*/
|
||||
public function addPreviousToOutput($addPreviousToOutput = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->addPreviousToOutput;
|
||||
}
|
||||
|
||||
$this->addPreviousToOutput = (bool) $addPreviousToOutput;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add error trace function arguments to output.
|
||||
* Set to True for all frame args, or integer for the n first frame args.
|
||||
* @param bool|integer|null $addTraceFunctionArgsToOutput
|
||||
* @return static|bool|integer
|
||||
*/
|
||||
public function addTraceFunctionArgsToOutput($addTraceFunctionArgsToOutput = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->addTraceFunctionArgsToOutput;
|
||||
}
|
||||
|
||||
if (! is_integer($addTraceFunctionArgsToOutput)) {
|
||||
$this->addTraceFunctionArgsToOutput = (bool) $addTraceFunctionArgsToOutput;
|
||||
} else {
|
||||
$this->addTraceFunctionArgsToOutput = $addTraceFunctionArgsToOutput;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the size limit in bytes of frame arguments var_dump output.
|
||||
* If the limit is reached, the var_dump output is discarded.
|
||||
* Prevent memory limit errors.
|
||||
* @var integer
|
||||
* @return static
|
||||
*/
|
||||
public function setTraceFunctionArgsOutputLimit($traceFunctionArgsOutputLimit)
|
||||
{
|
||||
$this->traceFunctionArgsOutputLimit = (integer) $traceFunctionArgsOutputLimit;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create plain text response and return it as a string
|
||||
* @return string
|
||||
*/
|
||||
public function generateResponse()
|
||||
{
|
||||
$exception = $this->getException();
|
||||
$message = $this->getExceptionOutput($exception);
|
||||
|
||||
if ($this->addPreviousToOutput) {
|
||||
$previous = $exception->getPrevious();
|
||||
while ($previous) {
|
||||
$message .= "\n\nCaused by\n" . $this->getExceptionOutput($previous);
|
||||
$previous = $previous->getPrevious();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $message . $this->getTraceOutput() . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size limit in bytes of frame arguments var_dump output.
|
||||
* If the limit is reached, the var_dump output is discarded.
|
||||
* Prevent memory limit errors.
|
||||
* @return integer
|
||||
*/
|
||||
public function getTraceFunctionArgsOutputLimit()
|
||||
{
|
||||
return $this->traceFunctionArgsOutputLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only output to logger.
|
||||
* @param bool|null $loggerOnly
|
||||
* @return static|bool
|
||||
*/
|
||||
public function loggerOnly($loggerOnly = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->loggerOnly;
|
||||
}
|
||||
|
||||
$this->loggerOnly = (bool) $loggerOnly;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if handler can output to stdout.
|
||||
* @return bool
|
||||
*/
|
||||
private function canOutput()
|
||||
{
|
||||
return !$this->loggerOnly();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the frame args var_dump.
|
||||
* @param \Whoops\Exception\Frame $frame [description]
|
||||
* @param integer $line [description]
|
||||
* @return string
|
||||
*/
|
||||
private function getFrameArgsOutput(Frame $frame, $line)
|
||||
{
|
||||
if ($this->addTraceFunctionArgsToOutput() === false
|
||||
|| $this->addTraceFunctionArgsToOutput() < $line) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Dump the arguments:
|
||||
ob_start();
|
||||
$this->dump($frame->getArgs());
|
||||
if (ob_get_length() > $this->getTraceFunctionArgsOutputLimit()) {
|
||||
// The argument var_dump is to big.
|
||||
// Discarded to limit memory usage.
|
||||
ob_clean();
|
||||
return sprintf(
|
||||
"\n%sArguments dump length greater than %d Bytes. Discarded.",
|
||||
self::VAR_DUMP_PREFIX,
|
||||
$this->getTraceFunctionArgsOutputLimit()
|
||||
);
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
"\n%s",
|
||||
preg_replace('/^/m', self::VAR_DUMP_PREFIX, ob_get_clean())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump variable.
|
||||
*
|
||||
* @param mixed $var
|
||||
* @return void
|
||||
*/
|
||||
protected function dump($var)
|
||||
{
|
||||
if ($this->dumper) {
|
||||
call_user_func($this->dumper, $var);
|
||||
} else {
|
||||
var_dump($var);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the exception trace as plain text.
|
||||
* @return string
|
||||
*/
|
||||
private function getTraceOutput()
|
||||
{
|
||||
if (! $this->addTraceToOutput()) {
|
||||
return '';
|
||||
}
|
||||
$inspector = $this->getInspector();
|
||||
$frames = $inspector->getFrames($this->getRun()->getFrameFilters());
|
||||
|
||||
$response = "\nStack trace:";
|
||||
|
||||
$line = 1;
|
||||
foreach ($frames as $frame) {
|
||||
/** @var Frame $frame */
|
||||
$class = $frame->getClass();
|
||||
|
||||
$template = "\n%3d. %s->%s() %s:%d%s";
|
||||
if (! $class) {
|
||||
// Remove method arrow (->) from output.
|
||||
$template = "\n%3d. %s%s() %s:%d%s";
|
||||
}
|
||||
|
||||
$response .= sprintf(
|
||||
$template,
|
||||
$line,
|
||||
$class,
|
||||
$frame->getFunction(),
|
||||
$frame->getFile(),
|
||||
$frame->getLine(),
|
||||
$this->getFrameArgsOutput($frame, $line)
|
||||
);
|
||||
|
||||
$line++;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the exception as plain text.
|
||||
* @param \Throwable $exception
|
||||
* @return string
|
||||
*/
|
||||
private function getExceptionOutput($exception)
|
||||
{
|
||||
return sprintf(
|
||||
"%s: %s in file %s on line %d",
|
||||
get_class($exception),
|
||||
$exception->getMessage(),
|
||||
$exception->getFile(),
|
||||
$exception->getLine()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$response = $this->generateResponse();
|
||||
|
||||
if ($this->getLogger()) {
|
||||
$this->getLogger()->error($response);
|
||||
}
|
||||
|
||||
if (! $this->canOutput()) {
|
||||
return Handler::DONE;
|
||||
}
|
||||
|
||||
echo $response;
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function contentType()
|
||||
{
|
||||
return 'text/plain';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,832 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use RuntimeException;
|
||||
use Symfony\Component\VarDumper\Cloner\AbstractCloner;
|
||||
use Symfony\Component\VarDumper\Cloner\VarCloner;
|
||||
use UnexpectedValueException;
|
||||
use Whoops\Exception\Formatter;
|
||||
use Whoops\Util\Misc;
|
||||
use Whoops\Util\TemplateHelper;
|
||||
|
||||
class PrettyPageHandler extends Handler
|
||||
{
|
||||
const EDITOR_SUBLIME = "sublime";
|
||||
const EDITOR_TEXTMATE = "textmate";
|
||||
const EDITOR_EMACS = "emacs";
|
||||
const EDITOR_MACVIM = "macvim";
|
||||
const EDITOR_PHPSTORM = "phpstorm";
|
||||
const EDITOR_IDEA = "idea";
|
||||
const EDITOR_VSCODE = "vscode";
|
||||
const EDITOR_ATOM = "atom";
|
||||
const EDITOR_ESPRESSO = "espresso";
|
||||
const EDITOR_XDEBUG = "xdebug";
|
||||
const EDITOR_NETBEANS = "netbeans";
|
||||
|
||||
/**
|
||||
* Search paths to be scanned for resources.
|
||||
*
|
||||
* Stored in the reverse order they're declared.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $searchPaths = [];
|
||||
|
||||
/**
|
||||
* Fast lookup cache for known resource locations.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $resourceCache = [];
|
||||
|
||||
/**
|
||||
* The name of the custom css file.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
private $customCss = null;
|
||||
|
||||
/**
|
||||
* The name of the custom js file.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
private $customJs = null;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $extraTables = [];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $handleUnconditionally = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $pageTitle = "Whoops! There was an error.";
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $applicationPaths;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
*/
|
||||
private $blacklist = [
|
||||
'_GET' => [],
|
||||
'_POST' => [],
|
||||
'_FILES' => [],
|
||||
'_COOKIE' => [],
|
||||
'_SESSION' => [],
|
||||
'_SERVER' => [],
|
||||
'_ENV' => [],
|
||||
];
|
||||
|
||||
/**
|
||||
* An identifier for a known IDE/text editor.
|
||||
*
|
||||
* Either a string, or a calalble that resolves a string, that can be used
|
||||
* to open a given file in an editor. If the string contains the special
|
||||
* substrings %file or %line, they will be replaced with the correct data.
|
||||
*
|
||||
* @example
|
||||
* "txmt://open?url=%file&line=%line"
|
||||
*
|
||||
* @var callable|string $editor
|
||||
*/
|
||||
protected $editor;
|
||||
|
||||
/**
|
||||
* A list of known editor strings.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $editors = [
|
||||
"sublime" => "subl://open?url=file://%file&line=%line",
|
||||
"textmate" => "txmt://open?url=file://%file&line=%line",
|
||||
"emacs" => "emacs://open?url=file://%file&line=%line",
|
||||
"macvim" => "mvim://open/?url=file://%file&line=%line",
|
||||
"phpstorm" => "phpstorm://open?file=%file&line=%line",
|
||||
"idea" => "idea://open?file=%file&line=%line",
|
||||
"vscode" => "vscode://file/%file:%line",
|
||||
"atom" => "atom://core/open/file?filename=%file&line=%line",
|
||||
"espresso" => "x-espresso://open?filepath=%file&lines=%line",
|
||||
"netbeans" => "netbeans://open/?f=%file:%line",
|
||||
];
|
||||
|
||||
/**
|
||||
* @var TemplateHelper
|
||||
*/
|
||||
protected $templateHelper;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
|
||||
// Register editor using xdebug's file_link_format option.
|
||||
$this->editors['xdebug'] = function ($file, $line) {
|
||||
return str_replace(['%f', '%l'], [$file, $line], ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'));
|
||||
};
|
||||
|
||||
// If xdebug is available, use it as default editor.
|
||||
$this->setEditor('xdebug');
|
||||
}
|
||||
|
||||
// Add the default, local resource search path:
|
||||
$this->searchPaths[] = __DIR__ . "/../Resources";
|
||||
|
||||
// blacklist php provided auth based values
|
||||
$this->blacklist('_SERVER', 'PHP_AUTH_PW');
|
||||
|
||||
$this->templateHelper = new TemplateHelper();
|
||||
|
||||
if (class_exists('Symfony\Component\VarDumper\Cloner\VarCloner')) {
|
||||
$cloner = new VarCloner();
|
||||
// Only dump object internals if a custom caster exists for performance reasons
|
||||
// https://github.com/filp/whoops/pull/404
|
||||
$cloner->addCasters(['*' => function ($obj, $a, $stub, $isNested, $filter = 0) {
|
||||
$class = $stub->class;
|
||||
$classes = [$class => $class] + class_parents($obj) + class_implements($obj);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
if (isset(AbstractCloner::$defaultCasters[$class])) {
|
||||
return $a;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all internals
|
||||
return [];
|
||||
}]);
|
||||
$this->templateHelper->setCloner($cloner);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->handleUnconditionally()) {
|
||||
// Check conditions for outputting HTML:
|
||||
// @todo: Make this more robust
|
||||
if (PHP_SAPI === 'cli') {
|
||||
// Help users who have been relying on an internal test value
|
||||
// fix their code to the proper method
|
||||
if (isset($_ENV['whoops-test'])) {
|
||||
throw new \Exception(
|
||||
'Use handleUnconditionally instead of whoops-test'
|
||||
.' environment variable'
|
||||
);
|
||||
}
|
||||
|
||||
return Handler::DONE;
|
||||
}
|
||||
}
|
||||
|
||||
$templateFile = $this->getResource("views/layout.html.php");
|
||||
$cssFile = $this->getResource("css/whoops.base.css");
|
||||
$zeptoFile = $this->getResource("js/zepto.min.js");
|
||||
$prismJs = $this->getResource("js/prism.js");
|
||||
$prismCss = $this->getResource("css/prism.css");
|
||||
$clipboard = $this->getResource("js/clipboard.min.js");
|
||||
$jsFile = $this->getResource("js/whoops.base.js");
|
||||
|
||||
if ($this->customCss) {
|
||||
$customCssFile = $this->getResource($this->customCss);
|
||||
}
|
||||
|
||||
if ($this->customJs) {
|
||||
$customJsFile = $this->getResource($this->customJs);
|
||||
}
|
||||
|
||||
$inspector = $this->getInspector();
|
||||
$frames = $this->getExceptionFrames();
|
||||
$code = $this->getExceptionCode();
|
||||
|
||||
// List of variables that will be passed to the layout template.
|
||||
$vars = [
|
||||
"page_title" => $this->getPageTitle(),
|
||||
|
||||
// @todo: Asset compiler
|
||||
"stylesheet" => file_get_contents($cssFile),
|
||||
"zepto" => file_get_contents($zeptoFile),
|
||||
"prismJs" => file_get_contents($prismJs),
|
||||
"prismCss" => file_get_contents($prismCss),
|
||||
"clipboard" => file_get_contents($clipboard),
|
||||
"javascript" => file_get_contents($jsFile),
|
||||
|
||||
// Template paths:
|
||||
"header" => $this->getResource("views/header.html.php"),
|
||||
"header_outer" => $this->getResource("views/header_outer.html.php"),
|
||||
"frame_list" => $this->getResource("views/frame_list.html.php"),
|
||||
"frames_description" => $this->getResource("views/frames_description.html.php"),
|
||||
"frames_container" => $this->getResource("views/frames_container.html.php"),
|
||||
"panel_details" => $this->getResource("views/panel_details.html.php"),
|
||||
"panel_details_outer" => $this->getResource("views/panel_details_outer.html.php"),
|
||||
"panel_left" => $this->getResource("views/panel_left.html.php"),
|
||||
"panel_left_outer" => $this->getResource("views/panel_left_outer.html.php"),
|
||||
"frame_code" => $this->getResource("views/frame_code.html.php"),
|
||||
"env_details" => $this->getResource("views/env_details.html.php"),
|
||||
|
||||
"title" => $this->getPageTitle(),
|
||||
"name" => explode("\\", $inspector->getExceptionName()),
|
||||
"message" => $inspector->getExceptionMessage(),
|
||||
"previousMessages" => $inspector->getPreviousExceptionMessages(),
|
||||
"docref_url" => $inspector->getExceptionDocrefUrl(),
|
||||
"code" => $code,
|
||||
"previousCodes" => $inspector->getPreviousExceptionCodes(),
|
||||
"plain_exception" => Formatter::formatExceptionPlain($inspector),
|
||||
"frames" => $frames,
|
||||
"has_frames" => !!count($frames),
|
||||
"handler" => $this,
|
||||
"handlers" => $this->getRun()->getHandlers(),
|
||||
|
||||
"active_frames_tab" => count($frames) && $frames->offsetGet(0)->isApplication() ? 'application' : 'all',
|
||||
"has_frames_tabs" => $this->getApplicationPaths(),
|
||||
|
||||
"tables" => [
|
||||
"GET Data" => $this->masked($_GET, '_GET'),
|
||||
"POST Data" => $this->masked($_POST, '_POST'),
|
||||
"Files" => isset($_FILES) ? $this->masked($_FILES, '_FILES') : [],
|
||||
"Cookies" => $this->masked($_COOKIE, '_COOKIE'),
|
||||
"Session" => isset($_SESSION) ? $this->masked($_SESSION, '_SESSION') : [],
|
||||
"Server/Request Data" => $this->masked($_SERVER, '_SERVER'),
|
||||
"Environment Variables" => $this->masked($_ENV, '_ENV'),
|
||||
],
|
||||
];
|
||||
|
||||
if (isset($customCssFile)) {
|
||||
$vars["stylesheet"] .= file_get_contents($customCssFile);
|
||||
}
|
||||
|
||||
if (isset($customJsFile)) {
|
||||
$vars["javascript"] .= file_get_contents($customJsFile);
|
||||
}
|
||||
|
||||
// Add extra entries list of data tables:
|
||||
// @todo: Consolidate addDataTable and addDataTableCallback
|
||||
$extraTables = array_map(function ($table) use ($inspector) {
|
||||
return $table instanceof \Closure ? $table($inspector) : $table;
|
||||
}, $this->getDataTables());
|
||||
$vars["tables"] = array_merge($extraTables, $vars["tables"]);
|
||||
|
||||
$plainTextHandler = new PlainTextHandler();
|
||||
$plainTextHandler->setRun($this->getRun());
|
||||
$plainTextHandler->setException($this->getException());
|
||||
$plainTextHandler->setInspector($this->getInspector());
|
||||
$vars["preface"] = "<!--\n\n\n" . $this->templateHelper->escape($plainTextHandler->generateResponse()) . "\n\n\n\n\n\n\n\n\n\n\n-->";
|
||||
|
||||
$this->templateHelper->setVariables($vars);
|
||||
$this->templateHelper->render($templateFile);
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the stack trace frames of the exception currently being handled.
|
||||
*
|
||||
* @return \Whoops\Exception\FrameCollection
|
||||
*/
|
||||
protected function getExceptionFrames()
|
||||
{
|
||||
$frames = $this->getInspector()->getFrames($this->getRun()->getFrameFilters());
|
||||
|
||||
if ($this->getApplicationPaths()) {
|
||||
foreach ($frames as $frame) {
|
||||
foreach ($this->getApplicationPaths() as $path) {
|
||||
if (strpos($frame->getFile(), $path) === 0) {
|
||||
$frame->setApplication(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $frames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the code of the exception currently being handled.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getExceptionCode()
|
||||
{
|
||||
$exception = $this->getException();
|
||||
|
||||
$code = $exception->getCode();
|
||||
if ($exception instanceof \ErrorException) {
|
||||
// ErrorExceptions wrap the php-error types within the 'severity' property
|
||||
$code = Misc::translateErrorCode($exception->getSeverity());
|
||||
}
|
||||
|
||||
return (string) $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function contentType()
|
||||
{
|
||||
return 'text/html';
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an entry to the list of tables displayed in the template.
|
||||
*
|
||||
* The expected data is a simple associative array. Any nested arrays
|
||||
* will be flattened with `print_r`.
|
||||
*
|
||||
* @param string $label
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addDataTable($label, array $data)
|
||||
{
|
||||
$this->extraTables[$label] = $data;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lazily adds an entry to the list of tables displayed in the table.
|
||||
*
|
||||
* The supplied callback argument will be called when the error is
|
||||
* rendered, it should produce a simple associative array. Any nested
|
||||
* arrays will be flattened with `print_r`.
|
||||
*
|
||||
* @param string $label
|
||||
* @param callable $callback Callable returning an associative array
|
||||
*
|
||||
* @throws InvalidArgumentException If $callback is not callable
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addDataTableCallback($label, /* callable */ $callback)
|
||||
{
|
||||
if (!is_callable($callback)) {
|
||||
throw new InvalidArgumentException('Expecting callback argument to be callable');
|
||||
}
|
||||
|
||||
$this->extraTables[$label] = function (\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
|
||||
try {
|
||||
$result = call_user_func($callback, $inspector);
|
||||
|
||||
// Only return the result if it can be iterated over by foreach().
|
||||
return is_array($result) || $result instanceof \Traversable ? $result : [];
|
||||
} catch (\Exception $e) {
|
||||
// Don't allow failure to break the rendering of the original exception.
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the extra data tables registered with this handler.
|
||||
*
|
||||
* Optionally accepts a 'label' parameter, to only return the data table
|
||||
* under that label.
|
||||
*
|
||||
* @param string|null $label
|
||||
*
|
||||
* @return array[]|callable
|
||||
*/
|
||||
public function getDataTables($label = null)
|
||||
{
|
||||
if ($label !== null) {
|
||||
return isset($this->extraTables[$label]) ?
|
||||
$this->extraTables[$label] : [];
|
||||
}
|
||||
|
||||
return $this->extraTables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether to handle unconditionally.
|
||||
*
|
||||
* Allows to disable all attempts to dynamically decide whether to handle
|
||||
* or return prematurely. Set this to ensure that the handler will perform,
|
||||
* no matter what.
|
||||
*
|
||||
* @param bool|null $value
|
||||
*
|
||||
* @return bool|static
|
||||
*/
|
||||
public function handleUnconditionally($value = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->handleUnconditionally;
|
||||
}
|
||||
|
||||
$this->handleUnconditionally = (bool) $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an editor resolver.
|
||||
*
|
||||
* Either a string, or a closure that resolves a string, that can be used
|
||||
* to open a given file in an editor. If the string contains the special
|
||||
* substrings %file or %line, they will be replaced with the correct data.
|
||||
*
|
||||
* @example
|
||||
* $run->addEditor('macvim', "mvim://open?url=file://%file&line=%line")
|
||||
* @example
|
||||
* $run->addEditor('remove-it', function($file, $line) {
|
||||
* unlink($file);
|
||||
* return "http://stackoverflow.com";
|
||||
* });
|
||||
*
|
||||
* @param string $identifier
|
||||
* @param string|callable $resolver
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addEditor($identifier, $resolver)
|
||||
{
|
||||
$this->editors[$identifier] = $resolver;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the editor to use to open referenced files.
|
||||
*
|
||||
* Pass either the name of a configured editor, or a closure that directly
|
||||
* resolves an editor string.
|
||||
*
|
||||
* @example
|
||||
* $run->setEditor(function($file, $line) { return "file:///{$file}"; });
|
||||
* @example
|
||||
* $run->setEditor('sublime');
|
||||
*
|
||||
* @param string|callable $editor
|
||||
*
|
||||
* @throws InvalidArgumentException If invalid argument identifier provided
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setEditor($editor)
|
||||
{
|
||||
if (!is_callable($editor) && !isset($this->editors[$editor])) {
|
||||
throw new InvalidArgumentException(
|
||||
"Unknown editor identifier: $editor. Known editors:" .
|
||||
implode(",", array_keys($this->editors))
|
||||
);
|
||||
}
|
||||
|
||||
$this->editor = $editor;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the editor href for a given file and line, if available.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @throws InvalidArgumentException If editor resolver does not return a string
|
||||
*
|
||||
* @return string|bool
|
||||
*/
|
||||
public function getEditorHref($filePath, $line)
|
||||
{
|
||||
$editor = $this->getEditor($filePath, $line);
|
||||
|
||||
if (empty($editor)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check that the editor is a string, and replace the
|
||||
// %line and %file placeholders:
|
||||
if (!isset($editor['url']) || !is_string($editor['url'])) {
|
||||
throw new UnexpectedValueException(
|
||||
__METHOD__ . " should always resolve to a string or a valid editor array; got something else instead."
|
||||
);
|
||||
}
|
||||
|
||||
$editor['url'] = str_replace("%line", rawurlencode($line), $editor['url']);
|
||||
$editor['url'] = str_replace("%file", rawurlencode($filePath), $editor['url']);
|
||||
|
||||
return $editor['url'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the editor link should act as an Ajax request.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @throws UnexpectedValueException If editor resolver does not return a boolean
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getEditorAjax($filePath, $line)
|
||||
{
|
||||
$editor = $this->getEditor($filePath, $line);
|
||||
|
||||
// Check that the ajax is a bool
|
||||
if (!isset($editor['ajax']) || !is_bool($editor['ajax'])) {
|
||||
throw new UnexpectedValueException(
|
||||
__METHOD__ . " should always resolve to a bool; got something else instead."
|
||||
);
|
||||
}
|
||||
return $editor['ajax'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines both the editor and if ajax should be used.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param int $line
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getEditor($filePath, $line)
|
||||
{
|
||||
if (!$this->editor || (!is_string($this->editor) && !is_callable($this->editor))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (is_string($this->editor) && isset($this->editors[$this->editor]) && !is_callable($this->editors[$this->editor])) {
|
||||
return [
|
||||
'ajax' => false,
|
||||
'url' => $this->editors[$this->editor],
|
||||
];
|
||||
}
|
||||
|
||||
if (is_callable($this->editor) || (isset($this->editors[$this->editor]) && is_callable($this->editors[$this->editor]))) {
|
||||
if (is_callable($this->editor)) {
|
||||
$callback = call_user_func($this->editor, $filePath, $line);
|
||||
} else {
|
||||
$callback = call_user_func($this->editors[$this->editor], $filePath, $line);
|
||||
}
|
||||
|
||||
if (empty($callback)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (is_string($callback)) {
|
||||
return [
|
||||
'ajax' => false,
|
||||
'url' => $callback,
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'ajax' => isset($callback['ajax']) ? $callback['ajax'] : false,
|
||||
'url' => isset($callback['url']) ? $callback['url'] : $callback,
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the page title.
|
||||
*
|
||||
* @param string $title
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setPageTitle($title)
|
||||
{
|
||||
$this->pageTitle = (string) $title;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the page title.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPageTitle()
|
||||
{
|
||||
return $this->pageTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a path to the list of paths to be searched for resources.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @throws InvalidArgumentException If $path is not a valid directory
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addResourcePath($path)
|
||||
{
|
||||
if (!is_dir($path)) {
|
||||
throw new InvalidArgumentException(
|
||||
"'$path' is not a valid directory"
|
||||
);
|
||||
}
|
||||
|
||||
array_unshift($this->searchPaths, $path);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom css file to be loaded.
|
||||
*
|
||||
* @param string|null $name
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addCustomCss($name)
|
||||
{
|
||||
$this->customCss = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a custom js file to be loaded.
|
||||
*
|
||||
* @param string|null $name
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function addCustomJs($name)
|
||||
{
|
||||
$this->customJs = $name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getResourcePaths()
|
||||
{
|
||||
return $this->searchPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a resource, by its relative path, in all available search paths.
|
||||
*
|
||||
* The search is performed starting at the last search path, and all the
|
||||
* way back to the first, enabling a cascading-type system of overrides for
|
||||
* all resources.
|
||||
*
|
||||
* @param string $resource
|
||||
*
|
||||
* @throws RuntimeException If resource cannot be found in any of the available paths
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getResource($resource)
|
||||
{
|
||||
// If the resource was found before, we can speed things up
|
||||
// by caching its absolute, resolved path:
|
||||
if (isset($this->resourceCache[$resource])) {
|
||||
return $this->resourceCache[$resource];
|
||||
}
|
||||
|
||||
// Search through available search paths, until we find the
|
||||
// resource we're after:
|
||||
foreach ($this->searchPaths as $path) {
|
||||
$fullPath = $path . "/$resource";
|
||||
|
||||
if (is_file($fullPath)) {
|
||||
// Cache the result:
|
||||
$this->resourceCache[$resource] = $fullPath;
|
||||
return $fullPath;
|
||||
}
|
||||
}
|
||||
|
||||
// If we got this far, nothing was found.
|
||||
throw new RuntimeException(
|
||||
"Could not find resource '$resource' in any resource paths."
|
||||
. "(searched: " . join(", ", $this->searchPaths). ")"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResourcesPath()
|
||||
{
|
||||
$allPaths = $this->getResourcePaths();
|
||||
|
||||
// Compat: return only the first path added
|
||||
return end($allPaths) ?: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param string $resourcesPath
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function setResourcesPath($resourcesPath)
|
||||
{
|
||||
$this->addResourcePath($resourcesPath);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the application paths.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getApplicationPaths()
|
||||
{
|
||||
return $this->applicationPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the application paths.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApplicationPaths(array $applicationPaths)
|
||||
{
|
||||
$this->applicationPaths = $applicationPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the application root path.
|
||||
*
|
||||
* @param string $applicationRootPath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApplicationRootPath($applicationRootPath)
|
||||
{
|
||||
$this->templateHelper->setApplicationRootPath($applicationRootPath);
|
||||
}
|
||||
|
||||
/**
|
||||
* blacklist a sensitive value within one of the superglobal arrays.
|
||||
* Alias for the hideSuperglobalKey method.
|
||||
*
|
||||
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
|
||||
* @param string $key The key within the superglobal
|
||||
* @see hideSuperglobalKey
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function blacklist($superGlobalName, $key)
|
||||
{
|
||||
$this->blacklist[$superGlobalName][] = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide a sensitive value within one of the superglobal arrays.
|
||||
*
|
||||
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
|
||||
* @param string $key The key within the superglobal
|
||||
* @return static
|
||||
*/
|
||||
public function hideSuperglobalKey($superGlobalName, $key)
|
||||
{
|
||||
return $this->blacklist($superGlobalName, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks all values within the given superGlobal array.
|
||||
*
|
||||
* Blacklisted values will be replaced by a equal length string containing
|
||||
* only '*' characters for string values.
|
||||
* Non-string values will be replaced with a fixed asterisk count.
|
||||
* We intentionally dont rely on $GLOBALS as it depends on the 'auto_globals_jit' php.ini setting.
|
||||
*
|
||||
* @param array|\ArrayAccess $superGlobal One of the superglobal arrays
|
||||
* @param string $superGlobalName The name of the superglobal array, e.g. '_GET'
|
||||
*
|
||||
* @return array $values without sensitive data
|
||||
*/
|
||||
private function masked($superGlobal, $superGlobalName)
|
||||
{
|
||||
$blacklisted = $this->blacklist[$superGlobalName];
|
||||
|
||||
$values = $superGlobal;
|
||||
|
||||
foreach ($blacklisted as $key) {
|
||||
if (isset($superGlobal[$key])) {
|
||||
$values[$key] = str_repeat('*', is_string($superGlobal[$key]) ? strlen($superGlobal[$key]) : 3);
|
||||
}
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use SimpleXMLElement;
|
||||
use Whoops\Exception\Formatter;
|
||||
|
||||
/**
|
||||
* Catches an exception and converts it to an XML
|
||||
* response. Additionally can also return exception
|
||||
* frames for consumption by an API.
|
||||
*/
|
||||
class XmlResponseHandler extends Handler
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $returnFrames = false;
|
||||
|
||||
/**
|
||||
* @param bool|null $returnFrames
|
||||
* @return bool|static
|
||||
*/
|
||||
public function addTraceToOutput($returnFrames = null)
|
||||
{
|
||||
if (func_num_args() == 0) {
|
||||
return $this->returnFrames;
|
||||
}
|
||||
|
||||
$this->returnFrames = (bool) $returnFrames;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$response = [
|
||||
'error' => Formatter::formatExceptionAsDataArray(
|
||||
$this->getInspector(),
|
||||
$this->addTraceToOutput(),
|
||||
$this->getRun()->getFrameFilters()
|
||||
),
|
||||
];
|
||||
|
||||
echo self::toXml($response);
|
||||
|
||||
return Handler::QUIT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function contentType()
|
||||
{
|
||||
return 'application/xml';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SimpleXMLElement $node Node to append data to, will be modified in place
|
||||
* @param array|\Traversable $data
|
||||
* @return SimpleXMLElement The modified node, for chaining
|
||||
*/
|
||||
private static function addDataToNode(\SimpleXMLElement $node, $data)
|
||||
{
|
||||
assert(is_array($data) || $data instanceof Traversable);
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_numeric($key)) {
|
||||
// Convert the key to a valid string
|
||||
$key = "unknownNode_". (string) $key;
|
||||
}
|
||||
|
||||
// Delete any char not allowed in XML element names
|
||||
$key = preg_replace('/[^a-z0-9\-\_\.\:]/i', '', $key);
|
||||
|
||||
if (is_array($value)) {
|
||||
$child = $node->addChild($key);
|
||||
self::addDataToNode($child, $value);
|
||||
} else {
|
||||
$value = str_replace('&', '&', print_r($value, true));
|
||||
$node->addChild($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* The main function for converting to an XML document.
|
||||
*
|
||||
* @param array|\Traversable $data
|
||||
* @return string XML
|
||||
*/
|
||||
private static function toXml($data)
|
||||
{
|
||||
assert(is_array($data) || $data instanceof Traversable);
|
||||
|
||||
$node = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><root />");
|
||||
|
||||
return self::addDataToNode($node, $data)->asXML();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Inspector;
|
||||
|
||||
use Whoops\Exception\Inspector;
|
||||
|
||||
class InspectorFactory implements InspectorFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @param \Throwable $exception
|
||||
* @return InspectorInterface
|
||||
*/
|
||||
public function create($exception)
|
||||
{
|
||||
return new Inspector($exception, $this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Inspector;
|
||||
|
||||
interface InspectorFactoryInterface
|
||||
{
|
||||
/**
|
||||
* @param \Throwable $exception
|
||||
* @return InspectorInterface
|
||||
*/
|
||||
public function create($exception);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Inspector;
|
||||
|
||||
interface InspectorInterface
|
||||
{
|
||||
/**
|
||||
* @return \Throwable
|
||||
*/
|
||||
public function getException();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExceptionName();
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExceptionMessage();
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPreviousExceptionMessages();
|
||||
|
||||
/**
|
||||
* @return int[]
|
||||
*/
|
||||
public function getPreviousExceptionCodes();
|
||||
|
||||
/**
|
||||
* Returns a url to the php-manual related to the underlying error - when available.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getExceptionDocrefUrl();
|
||||
|
||||
/**
|
||||
* Does the wrapped Exception has a previous Exception?
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreviousException();
|
||||
|
||||
/**
|
||||
* Returns an Inspector for a previous Exception, if any.
|
||||
* @todo Clean this up a bit, cache stuff a bit better.
|
||||
* @return InspectorInterface
|
||||
*/
|
||||
public function getPreviousExceptionInspector();
|
||||
|
||||
/**
|
||||
* Returns an array of all previous exceptions for this inspector's exception
|
||||
* @return \Throwable[]
|
||||
*/
|
||||
public function getPreviousExceptions();
|
||||
|
||||
/**
|
||||
* Returns an iterator for the inspected exception's
|
||||
* frames.
|
||||
*
|
||||
* @param array<callable> $frameFilters
|
||||
*
|
||||
* @return \Whoops\Exception\FrameCollection
|
||||
*/
|
||||
public function getFrames(array $frameFilters = []);
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/* PrismJS 1.29.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+markup-templating+php&plugins=line-highlight+line-numbers */
|
||||
code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}
|
||||
pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)}
|
||||
pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue