Upgrade to 3.3.3

This commit is contained in:
Bastian Allgeier
2020-01-20 12:19:33 +01:00
parent dd8a5e1ac3
commit 9c87f2fbc3
40 changed files with 1630 additions and 189 deletions

View File

@@ -1,7 +1,7 @@
{ {
"name": "getkirby/cms", "name": "getkirby/cms",
"description": "The Kirby 3 core", "description": "The Kirby 3 core",
"version": "3.3.2", "version": "3.3.3",
"license": "proprietary", "license": "proprietary",
"keywords": ["kirby", "cms", "core"], "keywords": ["kirby", "cms", "core"],
"homepage": "https://getkirby.com", "homepage": "https://getkirby.com",
@@ -30,7 +30,7 @@
"phpmailer/phpmailer": "6.0.7", "phpmailer/phpmailer": "6.0.7",
"filp/whoops": "2.3.1", "filp/whoops": "2.3.1",
"true/punycode": "2.1.1", "true/punycode": "2.1.1",
"zendframework/zend-escaper": "2.6.0" "laminas/laminas-escaper": "2.6.0"
}, },
"autoload": { "autoload": {
"files": ["config/setup.php"], "files": ["config/setup.php"],

148
kirby/composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "be4d625ce32603f849e29b8d2e841006", "content-hash": "d555f3a70378b49cf4e1eb249f8aeb85",
"packages": [ "packages": [
{ {
"name": "claviska/simpleimage", "name": "claviska/simpleimage",
@@ -144,6 +144,107 @@
"homepage": "https://getkirby.com", "homepage": "https://getkirby.com",
"time": "2019-02-11T20:27:36+00:00" "time": "2019-02-11T20:27:36+00:00"
}, },
{
"name": "laminas/laminas-escaper",
"version": "2.6.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "72d3a14647f6234cdd9386d6de821a98e539af91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/72d3a14647f6234cdd9386d6de821a98e539af91",
"reference": "72d3a14647f6234cdd9386d6de821a98e539af91",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
"php": "^5.6 || ^7.0"
},
"replace": {
"zendframework/zend-escaper": "self.version"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6.x-dev",
"dev-develop": "2.7.x-dev"
}
},
"autoload": {
"psr-4": {
"Laminas\\Escaper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
"homepage": "https://laminas.dev",
"keywords": [
"escaper",
"laminas"
],
"time": "2019-12-31T16:43:29+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "0fb9675b84a1666ab45182b6c5b29956921e818d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d",
"reference": "0fb9675b84a1666ab45182b6c5b29956921e818d",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev",
"dev-develop": "1.1.x-dev"
},
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"time": "2020-01-07T22:58:31+00:00"
},
{ {
"name": "league/color-extractor", "name": "league/color-extractor",
"version": "0.3.2", "version": "0.3.2",
@@ -515,51 +616,6 @@
"punycode" "punycode"
], ],
"time": "2016-11-16T10:37:54+00:00" "time": "2016-11-16T10:37:54+00:00"
},
{
"name": "zendframework/zend-escaper",
"version": "2.6.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-escaper.git",
"reference": "31d8aafae982f9568287cb4dce987e6aff8fd074"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074",
"reference": "31d8aafae982f9568287cb4dce987e6aff8fd074",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
"zendframework/zend-coding-standard": "~1.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.6.x-dev",
"dev-develop": "2.7.x-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Escaper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs",
"keywords": [
"ZendFramework",
"escaper",
"zf"
],
"time": "2018-04-25T15:48:53+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View File

@@ -67,7 +67,7 @@ return [
'methods' => [ 'methods' => [
'toDate' => function ($value) { 'toDate' => function ($value) {
if ($timestamp = timestamp($value, $this->time['step'] ?? 5)) { if ($timestamp = timestamp($value, $this->time['step'] ?? 5)) {
return date(DATE_W3C, $timestamp); return date('Y-m-d H:i:s', $timestamp);
} }
return null; return null;

View File

@@ -89,7 +89,12 @@ return [
[ [
'pattern' => 'files', 'pattern' => 'files',
'action' => function () { 'action' => function () {
return $this->field()->filepicker($this->field()->files()); $params = array_merge($this->field()->files(), [
'page' => $this->requestQuery('page'),
'search' => $this->requestQuery('search')
]);
return $this->field()->filepicker($params);
} }
], ],
[ [

View File

@@ -7,6 +7,7 @@ return function (array $props) {
'type' => 'files', 'type' => 'files',
'layout' => $props['layout'] ?? 'cards', 'layout' => $props['layout'] ?? 'cards',
'template' => $props['template'] ?? null, 'template' => $props['template'] ?? null,
'image' => $props['image'] ?? null,
'info' => '{{ file.dimensions }}' 'info' => '{{ file.dimensions }}'
] ]
]; ];
@@ -15,7 +16,8 @@ return function (array $props) {
unset( unset(
$props['headline'], $props['headline'],
$props['layout'], $props['layout'],
$props['template'] $props['template'],
$props['image']
); );
return $props; return $props;

View File

@@ -5,8 +5,6 @@ use Kirby\Cms\Media;
use Kirby\Cms\Panel; use Kirby\Cms\Panel;
use Kirby\Cms\PanelPlugins; use Kirby\Cms\PanelPlugins;
use Kirby\Cms\PluginAssets; use Kirby\Cms\PluginAssets;
use Kirby\Http\Response\Redirect;
use Kirby\Http\Router\Route;
use Kirby\Toolkit\Str; use Kirby\Toolkit\Str;
return function ($kirby) { return function ($kirby) {

View File

@@ -114,14 +114,16 @@ return [
$data[] = [ $data[] = [
'dragText' => $file->dragText('auto', $dragTextAbsolute), 'dragText' => $file->dragText('auto', $dragTextAbsolute),
'extension' => $file->extension(),
'filename' => $file->filename(), 'filename' => $file->filename(),
'id' => $file->id(), 'id' => $file->id(),
'text' => $file->toString($this->text),
'info' => $file->toString($this->info ?? false),
'icon' => $file->panelIcon($image), 'icon' => $file->panelIcon($image),
'image' => $image, 'image' => $image,
'info' => $file->toString($this->info ?? false),
'link' => $file->panelUrl(true), 'link' => $file->panelUrl(true),
'mime' => $file->mime(),
'parent' => $file->parent()->panelPath(), 'parent' => $file->parent()->panelPath(),
'text' => $file->toString($this->text),
'url' => $file->url(), 'url' => $file->url(),
]; ];
} }

View File

@@ -1,4 +1,5 @@
{ {
"آ" : "A",
"ا" : "a", "ا" : "a",
"ب" : "b", "ب" : "b",
"پ" : "p", "پ" : "p",
@@ -24,6 +25,7 @@
"ف" : "f", "ف" : "f",
"ق" : "g", "ق" : "g",
"ك" : "k", "ك" : "k",
"ک" : "k",
"گ" : "g", "گ" : "g",
"ل" : "l", "ل" : "l",
"م" : "m", "م" : "m",

166
kirby/i18n/rules/ja.json Executable file
View File

@@ -0,0 +1,166 @@
{
"きゃ": "kya",
"しゃ": "sha",
"ちゃ": "cha",
"にゃ": "nya",
"ひゃ": "hya",
"みゃ": "mya",
"りゃ": "rya",
"ぎゃ": "gya",
"じゃ": "ja",
"ぢゃ": "ja",
"びゃ": "bya",
"ぴゃ": "pya",
"きゅ": "kyu",
"しゅ": "shu",
"ちゅ": "chu",
"にゅ": "nyu",
"ひゅ": "hyu",
"みゅ": "myu",
"りゅ": "ryu",
"ぎゅ": "gyu",
"じゅ": "ju",
"ぢゅ": "ju",
"びゅ": "byu",
"ぴゅ": "pyu",
"きょ": "kyo",
"しょ": "sho",
"ちょ": "cho",
"にょ": "nyo",
"ひょ": "hyo",
"みょ": "myo",
"りょ": "ryo",
"ぎょ": "gyo",
"じょ": "jo",
"ぢょ": "jo",
"びょ": "byo",
"ぴょ": "pyo",
"あ": "a",
"ア": "a",
"か": "ka",
"カ": "ka",
"さ": "sa",
"サ": "sa",
"た": "ta",
"タ": "ta",
"な": "na",
"ナ": "na",
"は": "ha",
"ハ": "ha",
"ま": "ma",
"マ": "ma",
"や": "ya",
"ヤ": "ya",
"ら": "ra",
"ラ": "ra",
"わ": "wa",
"ワ": "wa",
"が": "ga",
"ざ": "za",
"だ": "da",
"ば": "ba",
"ぱ": "pa",
"い": "i",
"イ": "i",
"き": "ki",
"キ": "ki",
"し": "shi",
"シ": "shi",
"ち": "chi",
"チ": "chi",
"に": "ni",
"ニ": "ni",
"ひ": "hi",
"ヒ": "hi",
"み": "mi",
"ミ": "mi",
"り": "ri",
"リ": "ri",
"ゐ": "wi",
"ヰ": "wi",
"ぎ": "gi",
"じ": "dji",
"ぢ": "ji",
"び": "bi",
"ぴ": "pi",
"う": "u",
"ウ": "u",
"く": "ku",
"ク": "ku",
"す": "su",
"ス": "su",
"つ": "tsu",
"ツ": "tsu",
"ぬ": "nu",
"ヌ": "nu",
"ふ": "fu",
"フ": "fu",
"む": "mu",
"ム": "mu",
"ゆ": "yu",
"ユ": "yu",
"る": "ru",
"ル": "ru",
"ぐ": "gu",
"ず": "zu",
"づ": "dzu",
"ぶ": "bu",
"ぷ": "pu",
"え": "e",
"エ": "e",
"け": "ke",
"ケ": "ke",
"せ": "se",
"セ": "se",
"て": "te",
"テ": "te",
"ね": "ne",
"ネ": "ne",
"へ": "he",
"ヘ": "he",
"め": "me",
"メ": "me",
"れ": "re",
"レ": "re",
"ゑ": "we",
"ヱ": "we",
"げ": "ge",
"ぜ": "ze",
"で": "de",
"べ": "be",
"ぺ": "pe",
"お": "o",
"オ": "o",
"こ": "ko",
"コ": "ko",
"そ": "so",
"ソ": "so",
"と": "to",
"ト": "to",
"の": "no",
"": "no",
"ほ": "ho",
"ホ": "ho",
"も": "mo",
"モ": "mo",
"よ": "yo",
"ヨ": "yo",
"ろ": "ro",
"ロ": "ro",
"を": "wo",
"ヲ": "wo",
"ん": "n",
"ン": "n",
"ご": "go",
"ぞ": "zo",
"ど": "do",
"ぼ": "bo",
"ぽ": "po"
}

View File

@@ -1,91 +1,134 @@
{ {
"à": "a",
"ạ": "a", "ạ": "a",
"á": "a",
"ả": "a", "ả": "a",
"ã": "a",
"â": "a",
"ầ": "a", "ầ": "a",
"ấ": "a", "ấ": "a",
"ậ": "a", "ậ": "a",
"ẩ": "a", "ẩ": "a",
"ẫ": "a", "ẫ": "a",
"ă": "a",
"ằ": "a", "ằ": "a",
"ắ": "a", "ắ": "a",
"ặ": "a", "ặ": "a",
"ẳ": "a", "ẳ": "a",
"ẵ": "a", "ẵ": "a",
"è": "e",
"é": "e",
"ẹ": "e", "ẹ": "e",
"ẻ": "e", "ẻ": "e",
"ẽ": "e", "ẽ": "e",
"ê": "e",
"ề": "e", "ề": "e",
"ế": "e", "ế": "e",
"ệ": "e", "ệ": "e",
"ể": "e", "ể": "e",
"ễ": "e", "ễ": "e",
"ì": "i",
"í": "i",
"ị": "i", "ị": "i",
"ỉ": "i", "ỉ": "i",
"ĩ": "i",
"ò": "o",
"ó": "o",
"ọ": "o", "ọ": "o",
"ỏ": "o", "ỏ": "o",
"õ": "o",
"ô": "o",
"ồ": "o", "ồ": "o",
"ố": "o", "ố": "o",
"ộ": "o", "ộ": "o",
"ổ": "o", "ổ": "o",
"ỗ": "o", "ỗ": "o",
"ơ": "o",
"ờ": "o", "ờ": "o",
"ớ": "o", "ớ": "o",
"ợ": "o", "ợ": "o",
"ở": "o", "ở": "o",
"ỡ": "o", "ỡ": "o",
"ù": "u",
"ú": "u",
"ụ": "u", "ụ": "u",
"ủ": "u", "ủ": "u",
"ũ": "u",
"ư": "u",
"ừ": "u", "ừ": "u",
"ứ": "u", "ứ": "u",
"ự": "u", "ự": "u",
"ử": "u", "ử": "u",
"ữ": "u", "ữ": "u",
"y": "y",
"ỳ": "y", "ỳ": "y",
"ý": "y",
"ỵ": "y", "ỵ": "y",
"ỷ": "y", "ỷ": "y",
"ỹ": "y", "ỹ": "y",
"À": "A",
"Á": "A",
"Ạ": "A", "Ạ": "A",
"Ả": "A", "Ả": "A",
"Ã": "A",
"Â": "A",
"Ầ": "A", "Ầ": "A",
"Ấ": "A", "Ấ": "A",
"Ậ": "A", "Ậ": "A",
"Ẩ": "A", "Ẩ": "A",
"Ẫ": "A", "Ẫ": "A",
"Ă": "A",
"Ằ": "A", "Ằ": "A",
"Ắ": "A", "Ắ": "A",
"Ặ": "A", "Ặ": "A",
"Ẳ": "A", "Ẳ": "A",
"Ẵ": "A", "Ẵ": "A",
"È": "E",
"É": "E",
"Ẹ": "E", "Ẹ": "E",
"Ẻ": "E", "Ẻ": "E",
"Ẽ": "E", "Ẽ": "E",
"Ê": "E",
"Ề": "E", "Ề": "E",
"Ế": "E", "Ế": "E",
"Ệ": "E", "Ệ": "E",
"Ể": "E", "Ể": "E",
"Ễ": "E", "Ễ": "E",
"Ì": "I",
"Í": "I",
"Ị": "I", "Ị": "I",
"Ỉ": "I", "Ỉ": "I",
"Ĩ": "I",
"Ò": "O",
"Ó": "O",
"Ọ": "O", "Ọ": "O",
"Ỏ": "O", "Ỏ": "O",
"Õ": "O",
"Ô": "O",
"Ồ": "O", "Ồ": "O",
"Ố": "O", "Ố": "O",
"Ộ": "O", "Ộ": "O",
"Ổ": "O", "Ổ": "O",
"Ỗ": "O", "Ỗ": "O",
"Ơ": "O",
"Ờ": "O", "Ờ": "O",
"Ớ": "O", "Ớ": "O",
"Ợ": "O", "Ợ": "O",
"Ở": "O", "Ở": "O",
"Ỡ": "O", "Ỡ": "O",
"Ù": "U",
"Ụ": "U", "Ụ": "U",
"Ủ": "U", "Ủ": "U",
"Ũ": "U",
"Ư": "U",
"Ừ": "U", "Ừ": "U",
"Ứ": "U", "Ứ": "U",
"Ự": "U", "Ự": "U",
"Ử": "U", "Ử": "U",
"Ữ": "U", "Ữ": "U",
"Y": "Y",
"Ỳ": "Y", "Ỳ": "Y",
"Ý": "Y",
"Ỵ": "Y", "Ỵ": "Y",
"Ỷ": "Y", "Ỷ": "Y",
"Ỹ": "Y" "Ỹ": "Y"

View File

@@ -23,7 +23,7 @@
"delete": "Slet", "delete": "Slet",
"dimensions": "Dimensioner", "dimensions": "Dimensioner",
"disabled": "Disabled", "disabled": "Deaktiveret",
"discard": "Kass\u00e9r", "discard": "Kass\u00e9r",
"download": "Download", "download": "Download",
"duplicate": "Dupliker", "duplicate": "Dupliker",
@@ -61,21 +61,21 @@
"Uacceptabel fil-endelse", "Uacceptabel fil-endelse",
"error.file.extension.missing": "error.file.extension.missing":
"Du kan ikke uploade filer uden fil-endelse", "Du kan ikke uploade filer uden fil-endelse",
"error.file.maxheight": "The height of the image must not exceed {height} pixels", "error.file.maxheight": "Højden på billedet af billedet må ikke være større end {height} pixels",
"error.file.maxsize": "The file is too large", "error.file.maxsize": "Filen er for stor",
"error.file.maxwidth": "The width of the image must not exceed {width} pixels", "error.file.maxwidth": "Bredden af billedet må ikke være større end {width} pixels",
"error.file.mime.differs": "error.file.mime.differs":
"Den uploadede fil skal være af samme mime type \"{mime}\"", "Den uploadede fil skal være af samme mime type \"{mime}\"",
"error.file.mime.forbidden": "Media typen \"{mime}\" er ikke tilladt", "error.file.mime.forbidden": "Media typen \"{mime}\" er ikke tilladt",
"error.file.mime.invalid": "Invalid mime type: {mime}", "error.file.mime.invalid": "Ugyldig mime type: {mime}",
"error.file.mime.missing": "error.file.mime.missing":
"Media typen for \"{filename}\" kan ikke bestemmes", "Media typen for \"{filename}\" kan ikke bestemmes",
"error.file.minheight": "The height of the image must be at least {height} pixels", "error.file.minheight": "Højden af billedet skal mindst være {height} pixels",
"error.file.minsize": "The file is too small", "error.file.minsize": "Filen er for lille",
"error.file.minwidth": "The width of the image must be at least {width} pixels", "error.file.minwidth": "Bredden af billedet skal mindst være {width} pixels",
"error.file.name.missing": "Filnavn må ikke være tomt", "error.file.name.missing": "Filnavn må ikke være tomt",
"error.file.notFound": "Filen kunne ikke findes", "error.file.notFound": "Filen kunne ikke findes",
"error.file.orientation": "The orientation of the image must be \"{orientation}\"", "error.file.orientation": "Formatet på billedet skal være \"{orientation}\"",
"error.file.type.forbidden": "Du har ikke tilladelse til at uploade {type} filer", "error.file.type.forbidden": "Du har ikke tilladelse til at uploade {type} filer",
"error.file.undefined": "Filen kunne ikke findes", "error.file.undefined": "Filen kunne ikke findes",
@@ -166,7 +166,7 @@
"error.user.changeRole.permission": "error.user.changeRole.permission":
"Du har ikke tilladelse til at ændre rollen for brugeren \"{name}\"", "Du har ikke tilladelse til at ændre rollen for brugeren \"{name}\"",
"error.user.changeRole.toAdmin": "error.user.changeRole.toAdmin":
"You are not allowed to promote someone to the admin role", "Du har ikke tilladelse til at tildele nogen admin rollen",
"error.user.create.permission": "Du har ikke tilladelse til at oprette denne bruger", "error.user.create.permission": "Du har ikke tilladelse til at oprette denne bruger",
"error.user.delete": "Brugeren kunne ikke slettes", "error.user.delete": "Brugeren kunne ikke slettes",
"error.user.delete.lastAdmin": "Du kan ikke slette den sidste admin", "error.user.delete.lastAdmin": "Du kan ikke slette den sidste admin",
@@ -231,7 +231,7 @@
"error.validation.time": "Indtast venligst et gyldigt tidspunkt", "error.validation.time": "Indtast venligst et gyldigt tidspunkt",
"error.validation.url": "Indtast venligst en gyldig URL", "error.validation.url": "Indtast venligst en gyldig URL",
"field.required": "The field is required", "field.required": "Feltet er påkrævet",
"field.files.empty": "Ingen filer valgt endnu", "field.files.empty": "Ingen filer valgt endnu",
"field.pages.empty": "Ingen sider valgt endnu", "field.pages.empty": "Ingen sider valgt endnu",
"field.structure.delete.confirm": "\u00d8nsker du virkelig at slette denne indtastning?", "field.structure.delete.confirm": "\u00d8nsker du virkelig at slette denne indtastning?",
@@ -304,7 +304,7 @@
"loading": "Indlæser", "loading": "Indlæser",
"lock.unsaved": "Ugemte ændringer", "lock.unsaved": "Ugemte ændringer",
"lock.unsaved.empty": "There are no more unsaved changes", "lock.unsaved.empty": "Der er ikke flere ændringer der ikke er gamt",
"lock.isLocked": "Ugemte ændringer af <strong>{email}</strong>", "lock.isLocked": "Ugemte ændringer af <strong>{email}</strong>",
"lock.file.isLocked": "Filen redigeres på nuværende af {email} og kan derfor ikke ændres.", "lock.file.isLocked": "Filen redigeres på nuværende af {email} og kan derfor ikke ændres.",
"lock.page.isLocked": "Siden redigeres på nuværende af {email} og kan derfor ikke ændres.", "lock.page.isLocked": "Siden redigeres på nuværende af {email} og kan derfor ikke ændres.",
@@ -401,7 +401,7 @@
"save": "Gem", "save": "Gem",
"search": "Søg", "search": "Søg",
"section.required": "The section is required", "section.required": "Sektionen er påkrævet",
"select": "Vælg", "select": "Vælg",
"settings": "Indstillinger", "settings": "Indstillinger",

View File

@@ -29,9 +29,9 @@
"duplicate": "복제", "duplicate": "복제",
"edit": "\ud3b8\uc9d1", "edit": "\ud3b8\uc9d1",
"dialog.files.empty": "선택 파일이 없습니다.", "dialog.files.empty": "선택 파일이 없습니다.",
"dialog.pages.empty": "선택 페이지가 없습니다.", "dialog.pages.empty": "선택 페이지가 없습니다.",
"dialog.users.empty": "선택 사용자가 없습니다.", "dialog.users.empty": "선택 사용자가 없습니다.",
"email": "\uc774\uba54\uc77c \uc8fc\uc18c", "email": "\uc774\uba54\uc77c \uc8fc\uc18c",
"email.placeholder": "mail@example.com", "email.placeholder": "mail@example.com",
@@ -61,21 +61,21 @@
"이 확장자({extension})는 업로드할 수 없습니다.", "이 확장자({extension})는 업로드할 수 없습니다.",
"error.file.extension.missing": "error.file.extension.missing":
"파일({filename})에 확장자가 없습니다.", "파일({filename})에 확장자가 없습니다.",
"error.file.maxheight": "The height of the image must not exceed {height} pixels", "error.file.maxheight": "이미지의 높이는 {height}픽셀을 초과할 수 없습니다.",
"error.file.maxsize": "The file is too large", "error.file.maxsize": "파일이 너무 큽니다.",
"error.file.maxwidth": "The width of the image must not exceed {width} pixels", "error.file.maxwidth": "이미지의 너비는 {width}픽셀을 초과할 수 없습니다.",
"error.file.mime.differs": "error.file.mime.differs":
"기존 파일과 MIME 형식({mime})이 다릅니다.", "기존 파일과 MIME 형식({mime})이 다릅니다.",
"error.file.mime.forbidden": "이 MIME 형식({mime})은 업로드할 수 없습니다.", "error.file.mime.forbidden": "이 MIME 형식({mime})은 업로드할 수 없습니다.",
"error.file.mime.invalid": "Invalid mime type: {mime}", "error.file.mime.invalid": "MIME 형식({mime})이 올바르지 않습니다.",
"error.file.mime.missing": "error.file.mime.missing":
"파일({filename})의 형식을 알 수 없습니다.", "파일({filename})의 형식을 알 수 없습니다.",
"error.file.minheight": "The height of the image must be at least {height} pixels", "error.file.minheight": "이미지의 높이는 적어도 {height}픽셀 이상이어야 합니다.",
"error.file.minsize": "The file is too small", "error.file.minsize": "파일이 너무 작습니다.",
"error.file.minwidth": "The width of the image must be at least {width} pixels", "error.file.minwidth": "이미지의 너비는 적어도 {width}픽셀 이상이어야 합니다.",
"error.file.name.missing": "파일명을 입력하세요.", "error.file.name.missing": "파일명을 입력하세요.",
"error.file.notFound": "파일({filename})이 없습니다.", "error.file.notFound": "파일({filename})이 없습니다.",
"error.file.orientation": "The orientation of the image must be \"{orientation}\"", "error.file.orientation": "이미지의 비율({orientation})을 확인하세요.",
"error.file.type.forbidden": "이 형식({type})의 파일을 업로드할 권한이 없습니다.", "error.file.type.forbidden": "이 형식({type})의 파일을 업로드할 권한이 없습니다.",
"error.file.undefined": "\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.", "error.file.undefined": "\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.",
@@ -130,18 +130,18 @@
"error.section.files.max.singular": "error.section.files.max.singular":
"이 섹션({section})에는 파일을 하나 이상 추가할 수 없습니다.", "이 섹션({section})에는 파일을 하나 이상 추가할 수 없습니다.",
"error.section.files.min.plural": "error.section.files.min.plural":
"The \"{section}\" section requires at least {min} files", "이 섹션({section})에는 적어도 {min}개 이상의 파일이 필요합니다.",
"error.section.files.min.singular": "error.section.files.min.singular":
"The \"{section}\" section requires at least one file", "이 섹션({section})에는 적어도 하나 이상의 파일이 필요합니다.",
"error.section.pages.max.plural": "error.section.pages.max.plural":
"이 섹션({section})에는 페이지를 {max}개 이상 추가할 수 없습니다.", "이 섹션({section})에는 페이지를 {max}개 이상 추가할 수 없습니다.",
"error.section.pages.max.singular": "error.section.pages.max.singular":
"이 섹션({section})에는 페이지를 하나 이상 추가할 수 없습니다.", "이 섹션({section})에는 페이지를 하나 이상 추가할 수 없습니다.",
"error.section.pages.min.plural": "error.section.pages.min.plural":
"The \"{section}\" section requires at least {min} pages", "이 섹션({section})에 적어도 {min}개 이상의 페이지가 필요합니다.",
"error.section.pages.min.singular": "error.section.pages.min.singular":
"The \"{section}\" section requires at least one page", "이 섹션({section})에 적어도 하나 이상의 페이지가 필요합니다.",
"error.section.notLoaded": "섹션({name})을 불러올 수 없습니다.", "error.section.notLoaded": "섹션({name})을 불러올 수 없습니다.",
"error.section.type.invalid": "섹션의 형식({type})이 올바르지 않습니다.", "error.section.type.invalid": "섹션의 형식({type})이 올바르지 않습니다.",
@@ -239,7 +239,7 @@
"field.users.empty": "선택된 사용자가 없습니다.", "field.users.empty": "선택된 사용자가 없습니다.",
"file.delete.confirm": "file.delete.confirm":
"파일({filename})을 삭제할까요?", "<strong>파일({filename})</strong>을 삭제할까요?",
"files": "파일", "files": "파일",
"files.empty": "파일이 없습니다.", "files.empty": "파일이 없습니다.",
@@ -252,28 +252,28 @@
"installation.completed": "패널을 설치했습니다.", "installation.completed": "패널을 설치했습니다.",
"installation.disabled": "패널 설치 관리자는 로컬 서버에서 실행하거나 <code>panel.install</code> 옵션을 설정하세요.", "installation.disabled": "패널 설치 관리자는 로컬 서버에서 실행하거나 <code>panel.install</code> 옵션을 설정하세요.",
"installation.issues.accounts": "installation.issues.accounts":
"폴더(/site/accounts)에 쓰기 권한이 없습니다.", "폴더(<code>/site/accounts</code>)에 쓰기 권한이 없습니다.",
"installation.issues.content": "installation.issues.content":
"폴더(/content)에 쓰기 권한이 없습니다.", "폴더(<code>/content</code>)에 쓰기 권한이 없습니다.",
"installation.issues.curl": "<code>cURL</code> 확장 기능이 필요합니다.", "installation.issues.curl": "<code>cURL</code> 확장 기능이 필요합니다.",
"installation.issues.headline": "패널을 설치할 수 없습니다.", "installation.issues.headline": "패널을 설치할 수 없습니다.",
"installation.issues.mbstring": "installation.issues.mbstring":
"<code>MB String</code> 확장 기능이 필요합니다.", "<code>MB String</code> 확장 기능이 필요합니다.",
"installation.issues.media": "installation.issues.media":
"폴더(/media)에 쓰기 권한이 없습니다.", "폴더(<code>/media</code>)에 쓰기 권한이 없습니다.",
"installation.issues.php": "<code>PHP</code> 버전이 7 이상인지 확인하세요.", "installation.issues.php": "<code>PHP</code> 버전이 7 이상인지 확인하세요.",
"installation.issues.server": "installation.issues.server":
"<code>Apache</code>, <code>Nginx</code>, 또는 <code>Caddy</code>가 필요합니다.", "<code>Apache</code>, <code>Nginx</code>, 또는 <code>Caddy</code>가 필요합니다.",
"installation.issues.sessions": "폴더(/site/sessions)에 쓰기 권한이 없습니다.", "installation.issues.sessions": "폴더(<code>/site/sessions</code>)에 쓰기 권한이 없습니다.",
"language": "\uc5b8\uc5b4", "language": "\uc5b8\uc5b4",
"language.code": "언어 코드", "language.code": "언어 코드",
"language.convert": "기본 언어로 설정", "language.convert": "기본 언어로 설정",
"language.convert.confirm": "language.convert.confirm":
"이 언어({name})를 기본 언어로 설정할까요? 설정한 뒤에는 복원할 수 없습니다. 번역되지 않은 항목은 올바르게 표시되지 않을 수 있습니다.", "이 <strong>언어({name})</strong>를 기본 언어로 설정할까요? 설정한 뒤에는 복원할 수 없으며, 번역되지 않은 항목은 올바르게 표시되지 않을 수 있습니다.",
"language.create": "새 언어 추가", "language.create": "새 언어 추가",
"language.delete.confirm": "language.delete.confirm":
"언어({name})를 삭제할까요? 삭제한 뒤에는 복원할 수 없습니다.", "<strong>언어({name})</strong>를 삭제할까요? 삭제한 뒤에는 복원할 수 없습니다.",
"language.deleted": "언어를 삭제했습니다.", "language.deleted": "언어를 삭제했습니다.",
"language.direction": "읽기 방향", "language.direction": "읽기 방향",
"language.direction.ltr": "왼쪽에서 오른쪽", "language.direction.ltr": "왼쪽에서 오른쪽",
@@ -304,12 +304,12 @@
"loading": "로딩 중", "loading": "로딩 중",
"lock.unsaved": "수정 사항이 저장되지 않았습니다.", "lock.unsaved": "수정 사항이 저장되지 않았습니다.",
"lock.unsaved.empty": "There are no more unsaved changes", "lock.unsaved.empty": "저장되지 않은 페이지가 없습니다.",
"lock.isLocked": "<strong>{email}</strong> 수정 사항이 저장되지 않았습니다.", "lock.isLocked": "<strong>다른 사용자({email})</strong> 수정 사항이 저장되지 않았습니다.",
"lock.file.isLocked": "다른 사용자({email})가 수정 중입니다.", "lock.file.isLocked": "다른 사용자({email})가 수정 중인 파일입니다.",
"lock.page.isLocked": "다른 사용자({email}가 수정 중입니다.", "lock.page.isLocked": "다른 사용자({email}가 수정 중인 페이지입니다.",
"lock.unlock": "잠금", "lock.unlock": "잠금",
"lock.isUnlocked": "다른 사용자가 내용을 수정했으므로 내용이 저장되지 않았습니다. 저장되지 않은 내용을 내려받아 수동으로 대치할 수 있습니다.", "lock.isUnlocked": "다른 사용자가 이미 내용을 수정했으므로 현재 내용이 올바르게 저장되지 않았습니다. 저장되지 않은 내용을 내려받아 수동으로 대치할 수 있습니다.",
"login": "\ub85c\uadf8\uc778", "login": "\ub85c\uadf8\uc778",
"login.remember": "로그인 유지", "login.remember": "로그인 유지",
@@ -395,7 +395,7 @@
"role.all": "전체 보기", "role.all": "전체 보기",
"role.empty": "이 역할에 해당하는 사용자가 없습니다.", "role.empty": "이 역할에 해당하는 사용자가 없습니다.",
"role.description.placeholder": "설명이 없습니다.", "role.description.placeholder": "설명이 없습니다.",
"role.nobody.description": "대체 사용자는 어떤 권한 없습니다.", "role.nobody.description": "대체 사용자는 아무 권한 없습니다.",
"role.nobody.title": "사용자가 없습니다.", "role.nobody.title": "사용자가 없습니다.",
"save": "\uc800\uc7a5", "save": "\uc800\uc7a5",
@@ -437,11 +437,11 @@
"upload.error.cantWrite": "디스크를 읽을 수 없습니다.", "upload.error.cantWrite": "디스크를 읽을 수 없습니다.",
"upload.error.default": "파일을 업로드할 수 없습니다.", "upload.error.default": "파일을 업로드할 수 없습니다.",
"upload.error.extension": "파일 확장자를 다시 한번 확인하세요.", "upload.error.extension": "파일 확장자를 다시 한번 확인하세요.",
"upload.error.formSize": "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the form", "upload.error.formSize": "허용된 크기를 초과해 파일을 업로드할 수 없습니다.",
"upload.error.iniPostSize": "The uploaded file exceeds the post_max_size directive in php.ini", "upload.error.iniPostSize": "허용된 크기를 초과해 파일을 업로드할 수 없습니다.",
"upload.error.iniSize": "The uploaded file exceeds the upload_max_filesize directive in php.ini", "upload.error.iniSize": "허용된 크기를 초과해 파일을 업로드할 수 없습니다.",
"upload.error.noFile": "업로드 파일이 없습니다.", "upload.error.noFile": "업로드 파일이 없습니다.",
"upload.error.noFiles": "업로드 파일이 없습니다.", "upload.error.noFiles": "업로드 파일이 없습니다.",
"upload.error.partial": "일부 파일만 업로드했습니다.", "upload.error.partial": "일부 파일만 업로드했습니다.",
"upload.error.tmpDir": "임시 폴더가 없습니다.", "upload.error.tmpDir": "임시 폴더가 없습니다.",
"upload.errors": "오류", "upload.errors": "오류",
@@ -464,7 +464,7 @@
"user.create": "사용자 추가", "user.create": "사용자 추가",
"user.delete": "사용자 삭제", "user.delete": "사용자 삭제",
"user.delete.confirm": "user.delete.confirm":
"<strong>이메일({email})</strong> 삭제할까요?", "<strong>사용자({email})</strong> 삭제할까요?",
"users": "사용자", "users": "사용자",

View File

@@ -34,7 +34,7 @@
"dialog.users.empty": "Inga användare att välja", "dialog.users.empty": "Inga användare att välja",
"email": "E-post", "email": "E-post",
"email.placeholder": "namn@exampel.se", "email.placeholder": "namn@exempel.se",
"error.access.login": "Ogiltig inloggning", "error.access.login": "Ogiltig inloggning",
"error.access.panel": "Du saknar behörighet att nå panelen", "error.access.panel": "Du saknar behörighet att nå panelen",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -513,11 +513,12 @@ class File extends ModelWithContent
if (empty($params['model']) === false) { if (empty($params['model']) === false) {
$uuid = $this->parent() === $params['model'] ? $this->filename() : $this->id(); $uuid = $this->parent() === $params['model'] ? $this->filename() : $this->id();
$absolute = $this->parent() !== $params['model'];
} }
return [ return [
'filename' => $this->filename(), 'filename' => $this->filename(),
'dragText' => $this->dragText(), 'dragText' => $this->dragText('auto', $absolute ?? false),
'icon' => $icon, 'icon' => $icon,
'id' => $this->id(), 'id' => $this->id(),
'image' => $image, 'image' => $image,

View File

@@ -68,6 +68,26 @@ trait FileModifications
]); ]);
} }
/**
* Alias for File::bw()
*
* @return \Kirby\Cms\FileVersion|\Kirby\Cms\File
*/
public function grayscale()
{
return $this->thumb(['grayscale' => true]);
}
/**
* Alias for File::bw()
*
* @return \Kirby\Cms\FileVersion|\Kirby\Cms\File
*/
public function greyscale()
{
return $this->thumb(['grayscale' => true]);
}
/** /**
* Sets the JPEG compression quality * Sets the JPEG compression quality
* *

View File

@@ -85,7 +85,10 @@ class FileRules
static::validMime($file, $upload->mime()); static::validMime($file, $upload->mime());
if ((string)$upload->mime() !== (string)$file->mime()) { if (
(string)$upload->mime() !== (string)$file->mime() &&
(string)$upload->extension() !== (string)$file->extension()
) {
throw new InvalidArgumentException([ throw new InvalidArgumentException([
'key' => 'file.mime.differs', 'key' => 'file.mime.differs',
'data' => ['mime' => $file->mime()] 'data' => ['mime' => $file->mime()]

View File

@@ -2,8 +2,6 @@
namespace Kirby\Cms; namespace Kirby\Cms;
use Kirby\Toolkit\Dir;
/** /**
* Extension of the Collection class that * Extension of the Collection class that
* introduces `Roles::factory()` to convert an * introduces `Roles::factory()` to convert an
@@ -116,12 +114,14 @@ class Roles extends Collection
// load roles from directory // load roles from directory
if ($root !== null) { if ($root !== null) {
foreach (Dir::read($root) as $filename) { foreach (glob($root . '/*.yml') as $file) {
$filename = basename($file);
if ($filename === 'default.yml') { if ($filename === 'default.yml') {
continue; continue;
} }
$role = Role::load($root . '/' . $filename, $inject); $role = Role::load($file, $inject);
$roles->set($role->id(), $role); $roles->set($role->id(), $role);
} }
} }

View File

@@ -3,6 +3,7 @@
namespace Kirby\Cms; namespace Kirby\Cms;
use Kirby\Http\Url as BaseUrl; use Kirby\Http\Url as BaseUrl;
use Kirby\Toolkit\Str;
/** /**
* The `Url` class extends the * The `Url` class extends the
@@ -76,8 +77,16 @@ class Url extends BaseUrl
} }
// get a language url for the linked page, if the page can be found // get a language url for the linked page, if the page can be found
if ($kirby->multilang() === true && $page = page($path)) { if ($kirby->multilang() === true) {
$path = $page->url($language); $parts = Str::split($path, '#');
if ($page = page($parts[0] ?? null)) {
$path = $page->url($language);
if (isset($parts[1]) === true) {
$path .= '#' . $parts[1];
}
}
} }
return $kirby->component('url')($kirby, $path, $options, function (string $path = null, $options = null) { return $kirby->component('url')($kirby, $path, $options, function (string $path = null, $options = null) {

View File

@@ -65,6 +65,18 @@ class Darkroom
$options['blur'] = 10; $options['blur'] = 10;
} }
// normalize the greyscale option
if (isset($options['greyscale']) === true) {
$options['grayscale'] = $options['greyscale'];
unset($options['greyscale']);
}
// normalize the bw option
if (isset($options['bw']) === true) {
$options['grayscale'] = $options['bw'];
unset($options['bw']);
}
if ($options['quality'] === null) { if ($options['quality'] === null) {
$options['quality'] = $this->settings['quality']; $options['quality'] = $this->settings['quality'];
} }

View File

@@ -2,7 +2,7 @@
namespace Kirby\Toolkit; namespace Kirby\Toolkit;
use Zend\Escaper\Escaper; use Laminas\Escaper\Escaper;
/** /**
* The `Escape` class provides methods * The `Escape` class provides methods
@@ -12,8 +12,8 @@ use Zend\Escaper\Escaper;
* attribute values like width, name, * attribute values like width, name,
* value, etc. * value, etc.
* *
* Wrapper for the Zend Escaper * Wrapper for the Laminas Escaper
* @link https://github.com/zendframework/zend-escaper * @link https://github.com/laminas/laminas-escaper
* *
* @package Kirby Toolkit * @package Kirby Toolkit
* @author Bastian Allgeier <bastian@getkirby.com> * @author Bastian Allgeier <bastian@getkirby.com>

View File

@@ -208,6 +208,15 @@ return array(
'Kirby\\Toolkit\\V' => $baseDir . '/src/Toolkit/V.php', 'Kirby\\Toolkit\\V' => $baseDir . '/src/Toolkit/V.php',
'Kirby\\Toolkit\\View' => $baseDir . '/src/Toolkit/View.php', 'Kirby\\Toolkit\\View' => $baseDir . '/src/Toolkit/View.php',
'Kirby\\Toolkit\\Xml' => $baseDir . '/src/Toolkit/Xml.php', 'Kirby\\Toolkit\\Xml' => $baseDir . '/src/Toolkit/Xml.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',
'Laminas\\ZendFrameworkBridge\\Autoloader' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/Autoloader.php',
'Laminas\\ZendFrameworkBridge\\ConfigPostProcessor' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php',
'Laminas\\ZendFrameworkBridge\\Module' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/Module.php',
'Laminas\\ZendFrameworkBridge\\Replacements' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/Replacements.php',
'Laminas\\ZendFrameworkBridge\\RewriteRules' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/RewriteRules.php',
'League\\ColorExtractor\\Color' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/Color.php', 'League\\ColorExtractor\\Color' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/Color.php',
'League\\ColorExtractor\\ColorExtractor' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php', 'League\\ColorExtractor\\ColorExtractor' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php',
'League\\ColorExtractor\\Palette' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/Palette.php', 'League\\ColorExtractor\\Palette' => $vendorDir . '/league/color-extractor/src/League/ColorExtractor/Palette.php',
@@ -254,9 +263,5 @@ return array(
'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.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\\SystemFacade' => $vendorDir . '/filp/whoops/src/Whoops/Util/SystemFacade.php',
'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', 'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
'Zend\\Escaper\\Escaper' => $vendorDir . '/zendframework/zend-escaper/src/Escaper.php',
'Zend\\Escaper\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-escaper/src/Exception/ExceptionInterface.php',
'Zend\\Escaper\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-escaper/src/Exception/InvalidArgumentException.php',
'Zend\\Escaper\\Exception\\RuntimeException' => $vendorDir . '/zendframework/zend-escaper/src/Exception/RuntimeException.php',
'claviska\\SimpleImage' => $vendorDir . '/claviska/simpleimage/src/claviska/SimpleImage.php', 'claviska\\SimpleImage' => $vendorDir . '/claviska/simpleimage/src/claviska/SimpleImage.php',
); );

View File

@@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'7e9bd612cc444b3eed788ebbe46263a0' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/autoload.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php', '04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php',
'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/config/setup.php', 'f864ae44e8154e5ff6f4eec32f46d37f' => $baseDir . '/config/setup.php',

View File

@@ -6,12 +6,13 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'),
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'), 'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
'TrueBV\\' => array($vendorDir . '/true/punycode/src'), 'TrueBV\\' => array($vendorDir . '/true/punycode/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
'Laminas\\ZendFrameworkBridge\\' => array($vendorDir . '/laminas/laminas-zendframework-bridge/src'),
'Laminas\\Escaper\\' => array($vendorDir . '/laminas/laminas-escaper/src'),
'Kirby\\' => array($baseDir . '/src', $vendorDir . '/getkirby/composer-installer/src'), 'Kirby\\' => array($baseDir . '/src', $vendorDir . '/getkirby/composer-installer/src'),
'' => array($vendorDir . '/league/color-extractor/src'), '' => array($vendorDir . '/league/color-extractor/src'),
); );

View File

@@ -7,16 +7,13 @@ namespace Composer\Autoload;
class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7 class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
{ {
public static $files = array ( public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php', '04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/config/setup.php', 'f864ae44e8154e5ff6f4eec32f46d37f' => __DIR__ . '/../..' . '/config/setup.php',
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'Z' =>
array (
'Zend\\Escaper\\' => 13,
),
'W' => 'W' =>
array ( array (
'Whoops\\' => 7, 'Whoops\\' => 7,
@@ -34,6 +31,11 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Psr\\Log\\' => 8, 'Psr\\Log\\' => 8,
'PHPMailer\\PHPMailer\\' => 20, 'PHPMailer\\PHPMailer\\' => 20,
), ),
'L' =>
array (
'Laminas\\ZendFrameworkBridge\\' => 28,
'Laminas\\Escaper\\' => 16,
),
'K' => 'K' =>
array ( array (
'Kirby\\' => 6, 'Kirby\\' => 6,
@@ -41,10 +43,6 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
); );
public static $prefixDirsPsr4 = array ( public static $prefixDirsPsr4 = array (
'Zend\\Escaper\\' =>
array (
0 => __DIR__ . '/..' . '/zendframework/zend-escaper/src',
),
'Whoops\\' => 'Whoops\\' =>
array ( array (
0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops', 0 => __DIR__ . '/..' . '/filp/whoops/src/Whoops',
@@ -65,6 +63,14 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
array ( array (
0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src',
), ),
'Laminas\\ZendFrameworkBridge\\' =>
array (
0 => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src',
),
'Laminas\\Escaper\\' =>
array (
0 => __DIR__ . '/..' . '/laminas/laminas-escaper/src',
),
'Kirby\\' => 'Kirby\\' =>
array ( array (
0 => __DIR__ . '/../..' . '/src', 0 => __DIR__ . '/../..' . '/src',
@@ -296,6 +302,15 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Kirby\\Toolkit\\V' => __DIR__ . '/../..' . '/src/Toolkit/V.php', 'Kirby\\Toolkit\\V' => __DIR__ . '/../..' . '/src/Toolkit/V.php',
'Kirby\\Toolkit\\View' => __DIR__ . '/../..' . '/src/Toolkit/View.php', 'Kirby\\Toolkit\\View' => __DIR__ . '/../..' . '/src/Toolkit/View.php',
'Kirby\\Toolkit\\Xml' => __DIR__ . '/../..' . '/src/Toolkit/Xml.php', 'Kirby\\Toolkit\\Xml' => __DIR__ . '/../..' . '/src/Toolkit/Xml.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',
'Laminas\\ZendFrameworkBridge\\Autoloader' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/Autoloader.php',
'Laminas\\ZendFrameworkBridge\\ConfigPostProcessor' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php',
'Laminas\\ZendFrameworkBridge\\Module' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/Module.php',
'Laminas\\ZendFrameworkBridge\\Replacements' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/Replacements.php',
'Laminas\\ZendFrameworkBridge\\RewriteRules' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/RewriteRules.php',
'League\\ColorExtractor\\Color' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/Color.php', 'League\\ColorExtractor\\Color' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/Color.php',
'League\\ColorExtractor\\ColorExtractor' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php', 'League\\ColorExtractor\\ColorExtractor' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/ColorExtractor.php',
'League\\ColorExtractor\\Palette' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/Palette.php', 'League\\ColorExtractor\\Palette' => __DIR__ . '/..' . '/league/color-extractor/src/League/ColorExtractor/Palette.php',
@@ -342,10 +357,6 @@ class ComposerStaticInit12091bebabd81c9aba88b2aeec22c8d7
'Whoops\\Util\\Misc' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/Misc.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\\SystemFacade' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/SystemFacade.php',
'Whoops\\Util\\TemplateHelper' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', 'Whoops\\Util\\TemplateHelper' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Util/TemplateHelper.php',
'Zend\\Escaper\\Escaper' => __DIR__ . '/..' . '/zendframework/zend-escaper/src/Escaper.php',
'Zend\\Escaper\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/zendframework/zend-escaper/src/Exception/ExceptionInterface.php',
'Zend\\Escaper\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/zendframework/zend-escaper/src/Exception/InvalidArgumentException.php',
'Zend\\Escaper\\Exception\\RuntimeException' => __DIR__ . '/..' . '/zendframework/zend-escaper/src/Exception/RuntimeException.php',
'claviska\\SimpleImage' => __DIR__ . '/..' . '/claviska/simpleimage/src/claviska/SimpleImage.php', 'claviska\\SimpleImage' => __DIR__ . '/..' . '/claviska/simpleimage/src/claviska/SimpleImage.php',
); );

View File

@@ -1,13 +1,12 @@
<?php <?php
/** /**
* Zend Framework (http://framework.zend.com/) * @see https://github.com/laminas/laminas-escaper for the canonical source repository
* * @copyright https://github.com/laminas/laminas-escaper/blob/master/COPYRIGHT.md
* @link http://github.com/zendframework/zf2 for the canonical source repository * @license https://github.com/laminas/laminas-escaper/blob/master/LICENSE.md New BSD License
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/ */
namespace Zend\Escaper; namespace Laminas\Escaper;
/** /**
* Context specific methods for use in secure output escaping * Context specific methods for use in secure output escaping

View File

@@ -0,0 +1,13 @@
<?php
/**
* @see https://github.com/laminas/laminas-escaper for the canonical source repository
* @copyright https://github.com/laminas/laminas-escaper/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-escaper/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Escaper\Exception;
interface ExceptionInterface
{
}

View File

@@ -0,0 +1,17 @@
<?php
/**
* @see https://github.com/laminas/laminas-escaper for the canonical source repository
* @copyright https://github.com/laminas/laminas-escaper/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-escaper/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Escaper\Exception;
/**
* Invalid argument exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{
}

View File

@@ -0,0 +1,17 @@
<?php
/**
* @see https://github.com/laminas/laminas-escaper for the canonical source repository
* @copyright https://github.com/laminas/laminas-escaper/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-escaper/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\Escaper\Exception;
/**
* Invalid argument exception
*/
class RuntimeException extends \RuntimeException implements
ExceptionInterface
{
}

View File

@@ -0,0 +1,515 @@
<?php
return [
// NEVER REWRITE
'zendframework/zendframework' => 'zendframework/zendframework',
'zend-developer-tools/toolbar/doctrine' => 'zend-developer-tools/toolbar/doctrine',
// NAMESPACES
// Zend Framework components
'Zend\\AuraDi\\Config' => 'Laminas\\AuraDi\\Config',
'Zend\\Authentication' => 'Laminas\\Authentication',
'Zend\\Barcode' => 'Laminas\\Barcode',
'Zend\\Cache' => 'Laminas\\Cache',
'Zend\\Captcha' => 'Laminas\\Captcha',
'Zend\\Code' => 'Laminas\\Code',
'ZendCodingStandard\\Sniffs' => 'LaminasCodingStandard\\Sniffs',
'ZendCodingStandard\\Utils' => 'LaminasCodingStandard\\Utils',
'Zend\\ComponentInstaller' => 'Laminas\\ComponentInstaller',
'Zend\\Config' => 'Laminas\\Config',
'Zend\\ConfigAggregator' => 'Laminas\\ConfigAggregator',
'Zend\\ConfigAggregatorModuleManager' => 'Laminas\\ConfigAggregatorModuleManager',
'Zend\\ConfigAggregatorParameters' => 'Laminas\\ConfigAggregatorParameters',
'Zend\\Console' => 'Laminas\\Console',
'Zend\\ContainerConfigTest' => 'Laminas\\ContainerConfigTest',
'Zend\\Crypt' => 'Laminas\\Crypt',
'Zend\\Db' => 'Laminas\\Db',
'ZendDeveloperTools' => 'Laminas\\DeveloperTools',
'Zend\\Di' => 'Laminas\\Di',
'Zend\\Diactoros' => 'Laminas\\Diactoros',
'ZendDiagnostics\\Check' => 'Laminas\\Diagnostics\\Check',
'ZendDiagnostics\\Result' => 'Laminas\\Diagnostics\\Result',
'ZendDiagnostics\\Runner' => 'Laminas\\Diagnostics\\Runner',
'Zend\\Dom' => 'Laminas\\Dom',
'Zend\\Escaper' => 'Laminas\\Escaper',
'Zend\\EventManager' => 'Laminas\\EventManager',
'Zend\\Feed' => 'Laminas\\Feed',
'Zend\\File' => 'Laminas\\File',
'Zend\\Filter' => 'Laminas\\Filter',
'Zend\\Form' => 'Laminas\\Form',
'Zend\\Http' => 'Laminas\\Http',
'Zend\\HttpHandlerRunner' => 'Laminas\\HttpHandlerRunner',
'Zend\\Hydrator' => 'Laminas\\Hydrator',
'Zend\\I18n' => 'Laminas\\I18n',
'Zend\\InputFilter' => 'Laminas\\InputFilter',
'Zend\\Json' => 'Laminas\\Json',
'Zend\\Ldap' => 'Laminas\\Ldap',
'Zend\\Loader' => 'Laminas\\Loader',
'Zend\\Log' => 'Laminas\\Log',
'Zend\\Mail' => 'Laminas\\Mail',
'Zend\\Math' => 'Laminas\\Math',
'Zend\\Memory' => 'Laminas\\Memory',
'Zend\\Mime' => 'Laminas\\Mime',
'Zend\\ModuleManager' => 'Laminas\\ModuleManager',
'Zend\\Mvc' => 'Laminas\\Mvc',
'Zend\\Navigation' => 'Laminas\\Navigation',
'Zend\\Paginator' => 'Laminas\\Paginator',
'Zend\\Permissions' => 'Laminas\\Permissions',
'Zend\\Pimple\\Config' => 'Laminas\\Pimple\\Config',
'Zend\\ProblemDetails' => 'Mezzio\\ProblemDetails',
'Zend\\ProgressBar' => 'Laminas\\ProgressBar',
'Zend\\Psr7Bridge' => 'Laminas\\Psr7Bridge',
'Zend\\Router' => 'Laminas\\Router',
'Zend\\Serializer' => 'Laminas\\Serializer',
'Zend\\Server' => 'Laminas\\Server',
'Zend\\ServiceManager' => 'Laminas\\ServiceManager',
'ZendService\\ReCaptcha' => 'Laminas\\ReCaptcha',
'ZendService\\Twitter' => 'Laminas\\Twitter',
'Zend\\Session' => 'Laminas\\Session',
'Zend\\SkeletonInstaller' => 'Laminas\\SkeletonInstaller',
'Zend\\Soap' => 'Laminas\\Soap',
'Zend\\Stdlib' => 'Laminas\\Stdlib',
'Zend\\Stratigility' => 'Laminas\\Stratigility',
'Zend\\Tag' => 'Laminas\\Tag',
'Zend\\Test' => 'Laminas\\Test',
'Zend\\Text' => 'Laminas\\Text',
'Zend\\Uri' => 'Laminas\\Uri',
'Zend\\Validator' => 'Laminas\\Validator',
'Zend\\View' => 'Laminas\\View',
'ZendXml' => 'Laminas\\Xml',
'Zend\\Xml2Json' => 'Laminas\\Xml2Json',
'Zend\\XmlRpc' => 'Laminas\\XmlRpc',
'ZendOAuth' => 'Laminas\\OAuth',
'Zend\\\\AuraDi\\\\Config' => 'Laminas\\\\AuraDi\\\\Config',
'Zend\\\\Authentication' => 'Laminas\\\\Authentication',
'Zend\\\\Barcode' => 'Laminas\\\\Barcode',
'Zend\\\\Cache' => 'Laminas\\\\Cache',
'Zend\\\\Captcha' => 'Laminas\\\\Captcha',
'Zend\\\\Code' => 'Laminas\\\\Code',
'ZendCodingStandard\\\\Sniffs' => 'LaminasCodingStandard\\\\Sniffs',
'ZendCodingStandard\\\\Utils' => 'LaminasCodingStandard\\\\Utils',
'Zend\\\\ComponentInstaller' => 'Laminas\\\\ComponentInstaller',
'Zend\\\\Config' => 'Laminas\\\\Config',
'Zend\\\\ConfigAggregator' => 'Laminas\\\\ConfigAggregator',
'Zend\\\\ConfigAggregatorModuleManager' => 'Laminas\\\\ConfigAggregatorModuleManager',
'Zend\\\\ConfigAggregatorParameters' => 'Laminas\\\\ConfigAggregatorParameters',
'Zend\\\\Console' => 'Laminas\\\\Console',
'Zend\\\\ContainerConfigTest' => 'Laminas\\\\ContainerConfigTest',
'Zend\\\\Crypt' => 'Laminas\\\\Crypt',
'Zend\\\\Db' => 'Laminas\\\\Db',
'Zend\\\\Di' => 'Laminas\\\\Di',
'Zend\\\\Diactoros' => 'Laminas\\\\Diactoros',
'ZendDiagnostics\\\\Check' => 'Laminas\\\\Diagnostics\\\\Check',
'ZendDiagnostics\\\\Result' => 'Laminas\\\\Diagnostics\\\\Result',
'ZendDiagnostics\\\\Runner' => 'Laminas\\\\Diagnostics\\\\Runner',
'Zend\\\\Dom' => 'Laminas\\\\Dom',
'Zend\\\\Escaper' => 'Laminas\\\\Escaper',
'Zend\\\\EventManager' => 'Laminas\\\\EventManager',
'Zend\\\\Feed' => 'Laminas\\\\Feed',
'Zend\\\\File' => 'Laminas\\\\File',
'Zend\\\\Filter' => 'Laminas\\\\Filter',
'Zend\\\\Form' => 'Laminas\\\\Form',
'Zend\\\\Http' => 'Laminas\\\\Http',
'Zend\\\\HttpHandlerRunner' => 'Laminas\\\\HttpHandlerRunner',
'Zend\\\\Hydrator' => 'Laminas\\\\Hydrator',
'Zend\\\\I18n' => 'Laminas\\\\I18n',
'Zend\\\\InputFilter' => 'Laminas\\\\InputFilter',
'Zend\\\\Json' => 'Laminas\\\\Json',
'Zend\\\\Ldap' => 'Laminas\\\\Ldap',
'Zend\\\\Loader' => 'Laminas\\\\Loader',
'Zend\\\\Log' => 'Laminas\\\\Log',
'Zend\\\\Mail' => 'Laminas\\\\Mail',
'Zend\\\\Math' => 'Laminas\\\\Math',
'Zend\\\\Memory' => 'Laminas\\\\Memory',
'Zend\\\\Mime' => 'Laminas\\\\Mime',
'Zend\\\\ModuleManager' => 'Laminas\\\\ModuleManager',
'Zend\\\\Mvc' => 'Laminas\\\\Mvc',
'Zend\\\\Navigation' => 'Laminas\\\\Navigation',
'Zend\\\\Paginator' => 'Laminas\\\\Paginator',
'Zend\\\\Permissions' => 'Laminas\\\\Permissions',
'Zend\\\\Pimple\\\\Config' => 'Laminas\\\\Pimple\\\\Config',
'Zend\\\\ProblemDetails' => 'Mezzio\\\\ProblemDetails',
'Zend\\\\ProgressBar' => 'Laminas\\\\ProgressBar',
'Zend\\\\Psr7Bridge' => 'Laminas\\\\Psr7Bridge',
'Zend\\\\Router' => 'Laminas\\\\Router',
'Zend\\\\Serializer' => 'Laminas\\\\Serializer',
'Zend\\\\Server' => 'Laminas\\\\Server',
'Zend\\\\ServiceManager' => 'Laminas\\\\ServiceManager',
'ZendService\\\\ReCaptcha' => 'Laminas\\\\ReCaptcha',
'ZendService\\\\Twitter' => 'Laminas\\\\Twitter',
'Zend\\\\Session' => 'Laminas\\\\Session',
'Zend\\\\SkeletonInstaller' => 'Laminas\\\\SkeletonInstaller',
'Zend\\\\Soap' => 'Laminas\\\\Soap',
'Zend\\\\Stdlib' => 'Laminas\\\\Stdlib',
'Zend\\\\Stratigility' => 'Laminas\\\\Stratigility',
'Zend\\\\Tag' => 'Laminas\\\\Tag',
'Zend\\\\Test' => 'Laminas\\\\Test',
'Zend\\\\Text' => 'Laminas\\\\Text',
'Zend\\\\Uri' => 'Laminas\\\\Uri',
'Zend\\\\Validator' => 'Laminas\\\\Validator',
'Zend\\\\View' => 'Laminas\\\\View',
'Zend\\\\Xml2Json' => 'Laminas\\\\Xml2Json',
'Zend\\\\XmlRpc' => 'Laminas\\\\XmlRpc',
'ZendHttp' => 'LaminasHttp', // class ZendHttpClientDecorator in zend-feed
'ZendModule' => 'LaminasModule', // class ZendModuleProvider in zend-config-aggregator-modulemanager
'a\\Zend\\' => 'a\\Zend\\',
'b\\Zend\\' => 'b\\Zend\\',
'c\\Zend\\' => 'c\\Zend\\',
'd\\Zend\\' => 'd\\Zend\\',
'e\\Zend\\' => 'e\\Zend\\',
'f\\Zend\\' => 'f\\Zend\\',
'g\\Zend\\' => 'g\\Zend\\',
'h\\Zend\\' => 'h\\Zend\\',
'i\\Zend\\' => 'i\\Zend\\',
'j\\Zend\\' => 'j\\Zend\\',
'k\\Zend\\' => 'k\\Zend\\',
'l\\Zend\\' => 'l\\Zend\\',
'm\\Zend\\' => 'm\\Zend\\',
'n\\Zend\\' => 'n\\Zend\\',
'o\\Zend\\' => 'o\\Zend\\',
'p\\Zend\\' => 'p\\Zend\\',
'q\\Zend\\' => 'q\\Zend\\',
'r\\Zend\\' => 'r\\Zend\\',
's\\Zend\\' => 's\\Zend\\',
't\\Zend\\' => 't\\Zend\\',
'u\\Zend\\' => 'u\\Zend\\',
'v\\Zend\\' => 'v\\Zend\\',
'w\\Zend\\' => 'w\\Zend\\',
'x\\Zend\\' => 'x\\Zend\\',
'y\\Zend\\' => 'y\\Zend\\',
'z\\Zend\\' => 'z\\Zend\\',
'a\\ZendOAuth\\' => 'a\\ZendOAuth\\',
'b\\ZendOAuth\\' => 'b\\ZendOAuth\\',
'c\\ZendOAuth\\' => 'c\\ZendOAuth\\',
'd\\ZendOAuth\\' => 'd\\ZendOAuth\\',
'e\\ZendOAuth\\' => 'e\\ZendOAuth\\',
'f\\ZendOAuth\\' => 'f\\ZendOAuth\\',
'g\\ZendOAuth\\' => 'g\\ZendOAuth\\',
'h\\ZendOAuth\\' => 'h\\ZendOAuth\\',
'i\\ZendOAuth\\' => 'i\\ZendOAuth\\',
'j\\ZendOAuth\\' => 'j\\ZendOAuth\\',
'k\\ZendOAuth\\' => 'k\\ZendOAuth\\',
'l\\ZendOAuth\\' => 'l\\ZendOAuth\\',
'm\\ZendOAuth\\' => 'm\\ZendOAuth\\',
'n\\ZendOAuth\\' => 'n\\ZendOAuth\\',
'o\\ZendOAuth\\' => 'o\\ZendOAuth\\',
'p\\ZendOAuth\\' => 'p\\ZendOAuth\\',
'q\\ZendOAuth\\' => 'q\\ZendOAuth\\',
'r\\ZendOAuth\\' => 'r\\ZendOAuth\\',
's\\ZendOAuth\\' => 's\\ZendOAuth\\',
't\\ZendOAuth\\' => 't\\ZendOAuth\\',
'u\\ZendOAuth\\' => 'u\\ZendOAuth\\',
'v\\ZendOAuth\\' => 'v\\ZendOAuth\\',
'w\\ZendOAuth\\' => 'w\\ZendOAuth\\',
'x\\ZendOAuth\\' => 'x\\ZendOAuth\\',
'y\\ZendOAuth\\' => 'y\\ZendOAuth\\',
'z\\ZendOAuth\\' => 'z\\ZendOAuth\\',
'a\\ZendService\\' => 'a\\ZendService\\',
'b\\ZendService\\' => 'b\\ZendService\\',
'c\\ZendService\\' => 'c\\ZendService\\',
'd\\ZendService\\' => 'd\\ZendService\\',
'e\\ZendService\\' => 'e\\ZendService\\',
'f\\ZendService\\' => 'f\\ZendService\\',
'g\\ZendService\\' => 'g\\ZendService\\',
'h\\ZendService\\' => 'h\\ZendService\\',
'i\\ZendService\\' => 'i\\ZendService\\',
'j\\ZendService\\' => 'j\\ZendService\\',
'k\\ZendService\\' => 'k\\ZendService\\',
'l\\ZendService\\' => 'l\\ZendService\\',
'm\\ZendService\\' => 'm\\ZendService\\',
'n\\ZendService\\' => 'n\\ZendService\\',
'o\\ZendService\\' => 'o\\ZendService\\',
'p\\ZendService\\' => 'p\\ZendService\\',
'q\\ZendService\\' => 'q\\ZendService\\',
'r\\ZendService\\' => 'r\\ZendService\\',
's\\ZendService\\' => 's\\ZendService\\',
't\\ZendService\\' => 't\\ZendService\\',
'u\\ZendService\\' => 'u\\ZendService\\',
'v\\ZendService\\' => 'v\\ZendService\\',
'w\\ZendService\\' => 'w\\ZendService\\',
'x\\ZendService\\' => 'x\\ZendService\\',
'y\\ZendService\\' => 'y\\ZendService\\',
'z\\ZendService\\' => 'z\\ZendService\\',
'a\\ZendXml\\' => 'a\\ZendXml\\',
'b\\ZendXml\\' => 'b\\ZendXml\\',
'c\\ZendXml\\' => 'c\\ZendXml\\',
'd\\ZendXml\\' => 'd\\ZendXml\\',
'e\\ZendXml\\' => 'e\\ZendXml\\',
'f\\ZendXml\\' => 'f\\ZendXml\\',
'g\\ZendXml\\' => 'g\\ZendXml\\',
'h\\ZendXml\\' => 'h\\ZendXml\\',
'i\\ZendXml\\' => 'i\\ZendXml\\',
'j\\ZendXml\\' => 'j\\ZendXml\\',
'k\\ZendXml\\' => 'k\\ZendXml\\',
'l\\ZendXml\\' => 'l\\ZendXml\\',
'm\\ZendXml\\' => 'm\\ZendXml\\',
'n\\ZendXml\\' => 'n\\ZendXml\\',
'o\\ZendXml\\' => 'o\\ZendXml\\',
'p\\ZendXml\\' => 'p\\ZendXml\\',
'q\\ZendXml\\' => 'q\\ZendXml\\',
'r\\ZendXml\\' => 'r\\ZendXml\\',
's\\ZendXml\\' => 's\\ZendXml\\',
't\\ZendXml\\' => 't\\ZendXml\\',
'u\\ZendXml\\' => 'u\\ZendXml\\',
'v\\ZendXml\\' => 'v\\ZendXml\\',
'w\\ZendXml\\' => 'w\\ZendXml\\',
'x\\ZendXml\\' => 'x\\ZendXml\\',
'y\\ZendXml\\' => 'y\\ZendXml\\',
'z\\ZendXml\\' => 'z\\ZendXml\\',
// Expressive
'Zend\\Expressive' => 'Mezzio',
'Zend\\\\Expressive' => 'Mezzio',
'ZendAuthentication' => 'LaminasAuthentication',
'ZendAcl' => 'LaminasAcl',
'ZendRbac' => 'LaminasRbac',
'ZendRouter' => 'LaminasRouter',
'ExpressiveUrlGenerator' => 'MezzioUrlGenerator',
'ExpressiveInstaller' => 'MezzioInstaller',
// Apigility
'ZF\\Apigility' => 'Laminas\\ApiTools',
'ZF\\ApiProblem' => 'Laminas\\ApiTools\\ApiProblem',
'ZF\\AssetManager' => 'Laminas\\ApiTools\\AssetManager',
'ZF\\ComposerAutoloading' => 'Laminas\\ComposerAutoloading',
'ZF\\Configuration' => 'Laminas\\ApiTools\\Configuration',
'ZF\\ContentNegotiation' => 'Laminas\\ApiTools\\ContentNegotiation',
'ZF\\ContentValidation' => 'Laminas\\ApiTools\\ContentValidation',
'ZF\\DevelopmentMode' => 'Laminas\\DevelopmentMode',
'ZF\\Doctrine\\QueryBuilder' => 'Laminas\\ApiTools\\Doctrine\\QueryBuilder',
'ZF\\Hal' => 'Laminas\\ApiTools\\Hal',
'ZF\\HttpCache' => 'Laminas\\ApiTools\\HttpCache',
'ZF\\MvcAuth' => 'Laminas\\ApiTools\\MvcAuth',
'ZF\\OAuth2' => 'Laminas\\ApiTools\\OAuth2',
'ZF\\Rest' => 'Laminas\\ApiTools\\Rest',
'ZF\\Rpc' => 'Laminas\\ApiTools\\Rpc',
'ZF\\Versioning' => 'Laminas\\ApiTools\\Versioning',
'a\\ZF\\' => 'a\\ZF\\',
'b\\ZF\\' => 'b\\ZF\\',
'c\\ZF\\' => 'c\\ZF\\',
'd\\ZF\\' => 'd\\ZF\\',
'e\\ZF\\' => 'e\\ZF\\',
'f\\ZF\\' => 'f\\ZF\\',
'g\\ZF\\' => 'g\\ZF\\',
'h\\ZF\\' => 'h\\ZF\\',
'i\\ZF\\' => 'i\\ZF\\',
'j\\ZF\\' => 'j\\ZF\\',
'k\\ZF\\' => 'k\\ZF\\',
'l\\ZF\\' => 'l\\ZF\\',
'm\\ZF\\' => 'm\\ZF\\',
'n\\ZF\\' => 'n\\ZF\\',
'o\\ZF\\' => 'o\\ZF\\',
'p\\ZF\\' => 'p\\ZF\\',
'q\\ZF\\' => 'q\\ZF\\',
'r\\ZF\\' => 'r\\ZF\\',
's\\ZF\\' => 's\\ZF\\',
't\\ZF\\' => 't\\ZF\\',
'u\\ZF\\' => 'u\\ZF\\',
'v\\ZF\\' => 'v\\ZF\\',
'w\\ZF\\' => 'w\\ZF\\',
'x\\ZF\\' => 'x\\ZF\\',
'y\\ZF\\' => 'y\\ZF\\',
'z\\ZF\\' => 'z\\ZF\\',
'ZF\\\\Apigility' => 'Laminas\\\\ApiTools',
'ZF\\\\ApiProblem' => 'Laminas\\\\ApiTools\\\\ApiProblem',
'ZF\\\\AssetManager' => 'Laminas\\\\ApiTools\\\\AssetManager',
'ZF\\\\ComposerAutoloading' => 'Laminas\\\\ComposerAutoloading',
'ZF\\\\Configuration' => 'Laminas\\\\ApiTools\\\\Configuration',
'ZF\\\\ContentNegotiation' => 'Laminas\\\\ApiTools\\\\ContentNegotiation',
'ZF\\\\ContentValidation' => 'Laminas\\\\ApiTools\\\\ContentValidation',
'ZF\\\\DevelopmentMode' => 'Laminas\\\\DevelopmentMode',
'ZF\\\\Doctrine\\\\QueryBuilder' => 'Laminas\\\\ApiTools\\\\Doctrine\\\\QueryBuilder',
'ZF\\\\Hal' => 'Laminas\\\\ApiTools\\\\Hal',
'ZF\\\\HttpCache' => 'Laminas\\\\ApiTools\\\\HttpCache',
'ZF\\\\MvcAuth' => 'Laminas\\\\ApiTools\\\\MvcAuth',
'ZF\\\\OAuth2' => 'Laminas\\\\ApiTools\\\\OAuth2',
'ZF\\\\Rest' => 'Laminas\\\\ApiTools\\\\Rest',
'ZF\\\\Rpc' => 'Laminas\\\\ApiTools\\\\Rpc',
'ZF\\\\Versioning' => 'Laminas\\\\ApiTools\\\\Versioning',
'ApigilityModuleInterface' => 'ApiToolsModuleInterface',
'ApigilityProviderInterface' => 'ApiToolsProviderInterface',
'ApigilityVersionController' => 'ApiToolsVersionController',
// PACKAGES
// ZF components, MVC
'zendframework/skeleton-application' => 'laminas/skeleton-application',
'zendframework/zend-auradi-config' => 'laminas/laminas-auradi-config',
'zendframework/zend-authentication' => 'laminas/laminas-authentication',
'zendframework/zend-barcode' => 'laminas/laminas-barcode',
'zendframework/zend-cache' => 'laminas/laminas-cache',
'zendframework/zend-captcha' => 'laminas/laminas-captcha',
'zendframework/zend-code' => 'laminas/laminas-code',
'zendframework/zend-coding-standard' => 'laminas/laminas-coding-standard',
'zendframework/zend-component-installer' => 'laminas/laminas-component-installer',
'zendframework/zend-composer-autoloading' => 'laminas/laminas-composer-autoloading',
'zendframework/zend-config-aggregator' => 'laminas/laminas-config-aggregator',
'zendframework/zend-config' => 'laminas/laminas-config',
'zendframework/zend-console' => 'laminas/laminas-console',
'zendframework/zend-container-config-test' => 'laminas/laminas-container-config-test',
'zendframework/zend-crypt' => 'laminas/laminas-crypt',
'zendframework/zend-db' => 'laminas/laminas-db',
'zendframework/zend-developer-tools' => 'laminas/laminas-developer-tools',
'zendframework/zend-diactoros' => 'laminas/laminas-diactoros',
'zendframework/zenddiagnostics' => 'laminas/laminas-diagnostics',
'zendframework/zend-di' => 'laminas/laminas-di',
'zendframework/zend-dom' => 'laminas/laminas-dom',
'zendframework/zend-escaper' => 'laminas/laminas-escaper',
'zendframework/zend-eventmanager' => 'laminas/laminas-eventmanager',
'zendframework/zend-feed' => 'laminas/laminas-feed',
'zendframework/zend-file' => 'laminas/laminas-file',
'zendframework/zend-filter' => 'laminas/laminas-filter',
'zendframework/zend-form' => 'laminas/laminas-form',
'zendframework/zend-httphandlerrunner' => 'laminas/laminas-httphandlerrunner',
'zendframework/zend-http' => 'laminas/laminas-http',
'zendframework/zend-hydrator' => 'laminas/laminas-hydrator',
'zendframework/zend-i18n' => 'laminas/laminas-i18n',
'zendframework/zend-i18n-resources' => 'laminas/laminas-i18n-resources',
'zendframework/zend-inputfilter' => 'laminas/laminas-inputfilter',
'zendframework/zend-json' => 'laminas/laminas-json',
'zendframework/zend-json-server' => 'laminas/laminas-json-server',
'zendframework/zend-ldap' => 'laminas/laminas-ldap',
'zendframework/zend-loader' => 'laminas/laminas-loader',
'zendframework/zend-log' => 'laminas/laminas-log',
'zendframework/zend-mail' => 'laminas/laminas-mail',
'zendframework/zend-math' => 'laminas/laminas-math',
'zendframework/zend-memory' => 'laminas/laminas-memory',
'zendframework/zend-mime' => 'laminas/laminas-mime',
'zendframework/zend-modulemanager' => 'laminas/laminas-modulemanager',
'zendframework/zend-mvc' => 'laminas/laminas-mvc',
'zendframework/zend-navigation' => 'laminas/laminas-navigation',
'zendframework/zend-oauth' => 'laminas/laminas-oauth',
'zendframework/zend-paginator' => 'laminas/laminas-paginator',
'zendframework/zend-permissions-acl' => 'laminas/laminas-permissions-acl',
'zendframework/zend-permissions-rbac' => 'laminas/laminas-permissions-rbac',
'zendframework/zend-pimple-config' => 'laminas/laminas-pimple-config',
'zendframework/zend-progressbar' => 'laminas/laminas-progressbar',
'zendframework/zend-psr7bridge' => 'laminas/laminas-psr7bridge',
'zendframework/zend-recaptcha' => 'laminas/laminas-recaptcha',
'zendframework/zend-router' => 'laminas/laminas-router',
'zendframework/zend-serializer' => 'laminas/laminas-serializer',
'zendframework/zend-server' => 'laminas/laminas-server',
'zendframework/zend-servicemanager' => 'laminas/laminas-servicemanager',
'zendframework/zendservice-recaptcha' => 'laminas/laminas-recaptcha',
'zendframework/zendservice-twitter' => 'laminas/laminas-twitter',
'zendframework/zend-session' => 'laminas/laminas-session',
'zendframework/zend-skeleton-installer' => 'laminas/laminas-skeleton-installer',
'zendframework/zend-soap' => 'laminas/laminas-soap',
'zendframework/zend-stdlib' => 'laminas/laminas-stdlib',
'zendframework/zend-stratigility' => 'laminas/laminas-stratigility',
'zendframework/zend-tag' => 'laminas/laminas-tag',
'zendframework/zend-test' => 'laminas/laminas-test',
'zendframework/zend-text' => 'laminas/laminas-text',
'zendframework/zend-uri' => 'laminas/laminas-uri',
'zendframework/zend-validator' => 'laminas/laminas-validator',
'zendframework/zend-view' => 'laminas/laminas-view',
'zendframework/zend-xml2json' => 'laminas/laminas-xml2json',
'zendframework/zend-xml' => 'laminas/laminas-xml',
'zendframework/zend-xmlrpc' => 'laminas/laminas-xmlrpc',
// Expressive packages
'zendframework/zend-expressive' => 'mezzio/mezzio',
'zendframework/zend-expressive-zendrouter' => 'mezzio/mezzio-laminasrouter',
'zendframework/zend-problem-details' => 'mezzio/mezzio-problem-details',
'zendframework/zend-expressive-zendviewrenderer' => 'mezzio/mezzio-laminasviewrenderer',
// Apigility packages
'zfcampus/apigility-documentation' => 'laminas-api-tools/documentation',
'zfcampus/statuslib-example' => 'laminas-api-tools/statuslib-example',
'zfcampus/zf-apigility' => 'laminas-api-tools/api-tools',
'zfcampus/zf-api-problem' => 'laminas-api-tools/api-tools-api-problem',
'zfcampus/zf-asset-manager' => 'laminas-api-tools/api-tools-asset-manager',
'zfcampus/zf-configuration' => 'laminas-api-tools/api-tools-configuration',
'zfcampus/zf-content-negotiation' => 'laminas-api-tools/api-tools-content-negotiation',
'zfcampus/zf-content-validation' => 'laminas-api-tools/api-tools-content-validation',
'zfcampus/zf-development-mode' => 'laminas/laminas-development-mode',
'zfcampus/zf-doctrine-querybuilder' => 'laminas-api-tools/api-tools-doctrine-querybuilder',
'zfcampus/zf-hal' => 'laminas-api-tools/api-tools-hal',
'zfcampus/zf-http-cache' => 'laminas-api-tools/api-tools-http-cache',
'zfcampus/zf-mvc-auth' => 'laminas-api-tools/api-tools-mvc-auth',
'zfcampus/zf-oauth2' => 'laminas-api-tools/api-tools-oauth2',
'zfcampus/zf-rest' => 'laminas-api-tools/api-tools-rest',
'zfcampus/zf-rpc' => 'laminas-api-tools/api-tools-rpc',
'zfcampus/zf-versioning' => 'laminas-api-tools/api-tools-versioning',
// CONFIG KEYS, SCRIPT NAMES, ETC
// ZF components
'::fromZend' => '::fromLaminas', // psr7bridge
'::toZend' => '::toLaminas', // psr7bridge
'use_zend_loader' => 'use_laminas_loader', // zend-modulemanager
'zend-config' => 'laminas-config',
'zend-developer-tools/' => 'laminas-developer-tools/',
'zend-tag-cloud' => 'laminas-tag-cloud',
'zenddevelopertools' => 'laminas-developer-tools',
'zendbarcode' => 'laminasbarcode',
'ZendBarcode' => 'LaminasBarcode',
'zendcache' => 'laminascache',
'ZendCache' => 'LaminasCache',
'zendconfig' => 'laminasconfig',
'ZendConfig' => 'LaminasConfig',
'zendfeed' => 'laminasfeed',
'ZendFeed' => 'LaminasFeed',
'zendfilter' => 'laminasfilter',
'ZendFilter' => 'LaminasFilter',
'zendform' => 'laminasform',
'ZendForm' => 'LaminasForm',
'zendi18n' => 'laminasi18n',
'ZendI18n' => 'LaminasI18n',
'zendinputfilter' => 'laminasinputfilter',
'ZendInputFilter' => 'LaminasInputFilter',
'zendlog' => 'laminaslog',
'ZendLog' => 'LaminasLog',
'zendmail' => 'laminasmail',
'ZendMail' => 'LaminasMail',
'zendmvc' => 'laminasmvc',
'ZendMvc' => 'LaminasMvc',
'zendpaginator' => 'laminaspaginator',
'ZendPaginator' => 'LaminasPaginator',
'zendserializer' => 'laminasserializer',
'ZendSerializer' => 'LaminasSerializer',
'zendtag' => 'laminastag',
'ZendTag' => 'LaminasTag',
'zendtext' => 'laminastext',
'ZendText' => 'LaminasText',
'zendvalidator' => 'laminasvalidator',
'ZendValidator' => 'LaminasValidator',
'zendview' => 'laminasview',
'ZendView' => 'LaminasView',
'zend-framework.flf' => 'laminas-project.flf',
// Expressive-related
"'zend-expressive'" => "'mezzio'",
'"zend-expressive"' => '"mezzio"',
'zend-expressive.' => 'mezzio.',
'zend-expressive-authorization' => 'mezzio-authorization',
'zend-expressive-hal' => 'mezzio-hal',
'zend-expressive-session' => 'mezzio-session',
'zend-expressive-swoole' => 'mezzio-swoole',
'zend-expressive-tooling' => 'mezzio-tooling',
// Apigility-related
"'zf-apigility'" => "'laminas-api-tools'",
'"zf-apigility"' => '"laminas-api-tools"',
'zf-apigility/' => 'api-tools/',
'zf-apigility-admin' => 'api-tools-admin',
'zf-content-negotiation' => 'api-tools-content-negotiation',
'zf-hal' => 'api-tools-hal',
'zf-rest' => 'api-tools-rest',
'zf-rpc' => 'api-tools-rpc',
'zf-content-validation' => 'api-tools-content-validation',
'zf-apigility-ui' => 'api-tools-ui',
'zf-apigility-documentation-blueprint' => 'api-tools-documentation-blueprint',
'zf-apigility-documentation-swagger' => 'api-tools-documentation-swagger',
'zf-apigility-welcome' => 'api-tools-welcome',
'zf-api-problem' => 'api-tools-api-problem',
'zf-configuration' => 'api-tools-configuration',
'zf-http-cache' => 'api-tools-http-cache',
'zf-mvc-auth' => 'api-tools-mvc-auth',
'zf-oauth2' => 'api-tools-oauth2',
'zf-versioning' => 'api-tools-versioning',
'ZfApigilityDoctrineQueryProviderManager' => 'LaminasApiToolsDoctrineQueryProviderManager',
'ZfApigilityDoctrineQueryCreateFilterManager' => 'LaminasApiToolsDoctrineQueryCreateFilterManager',
'zf-apigility-doctrine' => 'api-tools-doctrine',
'zf-development-mode' => 'laminas-development-mode',
];

View File

@@ -0,0 +1,156 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\ZendFrameworkBridge;
use ArrayObject;
use Composer\Autoload\ClassLoader;
use RuntimeException;
/**
* Alias legacy Zend Framework project classes/interfaces/traits to Laminas equivalents.
*/
class Autoloader
{
/**
* Attach autoloaders for managing legacy ZF artifacts.
*
* We attach two autoloaders:
*
* - The first is _prepended_ to handle new classes and add aliases for
* legacy classes. PHP expects any interfaces implemented, classes
* extended, or traits used when declaring class_alias() to exist and/or
* be autoloadable already at the time of declaration. If not, it will
* raise a fatal error. This autoloader helps mitigate errors in such
* situations.
*
* - The second is _appended_ in order to create aliases for legacy
* classes.
*/
public static function load()
{
$loaded = new ArrayObject([]);
spl_autoload_register(self::createPrependAutoloader(
RewriteRules::namespaceReverse(),
self::getClassLoader(),
$loaded
), true, true);
spl_autoload_register(self::createAppendAutoloader(
RewriteRules::namespaceRewrite(),
$loaded
));
}
/**
* @return ClassLoader
* @throws RuntimeException
*/
private static function getClassLoader()
{
if (file_exists(__DIR__ . '/../../../autoload.php')) {
return include __DIR__ . '/../../../autoload.php';
}
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return include __DIR__ . '/../vendor/autoload.php';
}
throw new RuntimeException('Cannot detect composer autoload. Please run composer install');
}
/**
* @return callable
*/
private static function createPrependAutoloader(array $namespaces, ClassLoader $classLoader, ArrayObject $loaded)
{
/**
* @param string $class Class name to autoload
* @return void
*/
return static function ($class) use ($namespaces, $classLoader, $loaded) {
if (isset($loaded[$class])) {
return;
}
$segments = explode('\\', $class);
$i = 0;
$check = '';
while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) {
$check .= $segments[$i] . '\\';
++$i;
}
if ($check === '') {
return;
}
if ($classLoader->loadClass($class)) {
$legacy = $namespaces[$check]
. strtr(substr($class, strlen($check)), [
'ApiTools' => 'Apigility',
'Mezzio' => 'Expressive',
'Laminas' => 'Zend',
]);
class_alias($class, $legacy);
}
};
}
/**
* @return callable
*/
private static function createAppendAutoloader(array $namespaces, ArrayObject $loaded)
{
/**
* @param string $class Class name to autoload
* @return void
*/
return static function ($class) use ($namespaces, $loaded) {
$segments = explode('\\', $class);
if ($segments[0] === 'ZendService' && isset($segments[1])) {
$segments[0] .= '\\' . $segments[1];
unset($segments[1]);
$segments = array_values($segments);
}
$i = 0;
$check = '';
// We are checking segments of the namespace to match quicker
while (isset($segments[$i + 1], $namespaces[$check . $segments[$i] . '\\'])) {
$check .= $segments[$i] . '\\';
++$i;
}
if ($check === '') {
return;
}
$alias = $namespaces[$check]
. strtr(substr($class, strlen($check)), [
'Apigility' => 'ApiTools',
'Expressive' => 'Mezzio',
'Zend' => 'Laminas',
'AbstractZendServer' => 'AbstractZendServer',
'ZendServerDisk' => 'ZendServerDisk',
'ZendServerShm' => 'ZendServerShm',
'ZendMonitor' => 'ZendMonitor',
]);
$loaded[$alias] = true;
if (class_exists($alias) || interface_exists($alias) || trait_exists($alias)) {
class_alias($alias, $class);
}
};
}
}

View File

@@ -0,0 +1,263 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\ZendFrameworkBridge;
class ConfigPostProcessor
{
/** @var array String keys => string values */
private $exactReplacements = [
'zend-expressive' => 'mezzio',
'zf-apigility' => 'api-tools',
];
/** @var Replacements */
private $replacements;
/** @var callable[] */
private $rulesets;
public function __construct()
{
$this->replacements = new Replacements();
/* Define the rulesets for replacements.
*
* Each ruleset has the following signature:
*
* @param mixed $value
* @param string[] $keys Full nested key hierarchy leading to the value
* @return null|callable
*
* If no match is made, a null is returned, allowing it to fallback to
* the next ruleset in the list. If a match is made, a callback is returned,
* and that will be used to perform the replacement on the value.
*
* The callback should have the following signature:
*
* @param mixed $value
* @param string[] $keys
* @return mixed The transformed value
*/
$this->rulesets = [
// Exact values
function ($value) {
return is_string($value) && isset($this->exactReplacements[$value])
? [$this, 'replaceExactValue']
: null;
},
// Router (MVC applications)
// We do not want to rewrite these.
function ($value, array $keys) {
$key = array_pop($keys);
// Only worried about a top-level "router" key.
return $key === 'router' && count($keys) === 0 && is_array($value)
? [$this, 'noopReplacement']
: null;
},
// Aliases and invokables
function ($value, array $keys) {
static $keysOfInterest;
$keysOfInterest = $keysOfInterest ?: ['aliases', 'invokables'];
$key = array_pop($keys);
return in_array($key, $keysOfInterest, true) && is_array($value)
? [$this, 'replaceDependencyAliases']
: null;
},
// Array values
function ($value, array $keys) {
return 0 !== count($keys) && is_array($value)
? [$this, '__invoke']
: null;
},
];
}
/**
* @param string[] $keys Hierarchy of keys, for determining location in
* nested configuration.
* @return array
*/
public function __invoke(array $config, array $keys = [])
{
$rewritten = [];
foreach ($config as $key => $value) {
// Determine new key from replacements
$newKey = is_string($key) ? $this->replace($key, $keys) : $key;
// Keep original values with original key, if the key has changed, but only at the top-level.
if (empty($keys) && $newKey !== $key) {
$rewritten[$key] = $value;
}
// Perform value replacements, if any
$newValue = $this->replace($value, $keys, $newKey);
// Key does not already exist and/or is not an array value
if (! array_key_exists($newKey, $rewritten) || ! is_array($rewritten[$newKey])) {
// Do not overwrite existing values with null values
$rewritten[$newKey] = array_key_exists($newKey, $rewritten) && null === $newValue
? $rewritten[$newKey]
: $newValue;
continue;
}
// New value is null; nothing to do.
if (null === $newValue) {
continue;
}
// Key already exists as an array value, but $value is not an array
if (! is_array($newValue)) {
$rewritten[$newKey][] = $newValue;
continue;
}
// Key already exists as an array value, and $value is also an array
$rewritten[$newKey] = static::merge($rewritten[$newKey], $newValue);
}
return $rewritten;
}
/**
* Perform substitutions as needed on an individual value.
*
* The $key is provided to allow fine-grained selection of rewrite rules.
*
* @param mixed $value
* @param string[] $keys Key hierarchy
* @param null|int|string $key
* @return mixed
*/
private function replace($value, array $keys, $key = null)
{
// Add new key to the list of keys.
// We do not need to remove it later, as we are working on a copy of the array.
array_push($keys, $key);
// Identify rewrite strategy and perform replacements
$rewriteRule = $this->replacementRuleMatch($value, $keys);
return $rewriteRule($value, $keys);
}
/**
* Merge two arrays together.
*
* If an integer key exists in both arrays, the value from the second array
* will be appended to the first array. If both values are arrays, they are
* merged together, else the value of the second array overwrites the one
* of the first array.
*
* Based on zend-stdlib Zend\Stdlib\ArrayUtils::merge
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
*
* @return array
*/
public static function merge(array $a, array $b)
{
foreach ($b as $key => $value) {
if (! isset($a[$key]) && ! array_key_exists($key, $a)) {
$a[$key] = $value;
continue;
}
if (null === $value && array_key_exists($key, $a)) {
// Leave as-is if value from $b is null
continue;
}
if (is_int($key)) {
$a[] = $value;
continue;
}
if (is_array($value) && is_array($a[$key])) {
$a[$key] = static::merge($a[$key], $value);
continue;
}
$a[$key] = $value;
}
return $a;
}
/**
* @param mixed $value
* @param null|int|string $key
* @return callable Callable to invoke with value
*/
private function replacementRuleMatch($value, $key = null)
{
foreach ($this->rulesets as $ruleset) {
$result = $ruleset($value, $key);
if (is_callable($result)) {
return $result;
}
}
return [$this, 'fallbackReplacement'];
}
/**
* Replace a value using the translation table, if the value is a string.
*
* @param mixed $value
* @return mixed
*/
private function fallbackReplacement($value)
{
return is_string($value)
? $this->replacements->replace($value)
: $value;
}
/**
* Replace a value matched exactly.
*
* @param mixed $value
* @return mixed
*/
private function replaceExactValue($value)
{
return $this->exactReplacements[$value];
}
/**
* Rewrite dependency aliases array
*
* In this case, we want to keep the alias as-is, but rewrite the target.
*
* This same logic can be used for invokables, which are essentially just
* an alias map.
*
* @return array
*/
private function replaceDependencyAliases(array $aliases)
{
foreach ($aliases as $alias => $target) {
$aliases[$alias] = $this->replacements->replace($target);
}
return $aliases;
}
/**
* @param mixed $value
* @return mixed Returns $value verbatim.
*/
private function noopReplacement($value)
{
return $value;
}
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\ZendFrameworkBridge;
use Laminas\ModuleManager\Listener\ConfigMergerInterface;
use Laminas\ModuleManager\ModuleEvent;
use Laminas\ModuleManager\ModuleManager;
class Module
{
/**
* Initialize the module.
*
* Type-hinting deliberately omitted to allow unit testing
* without dependencies on packages that do not exist yet.
*
* @param ModuleManager $moduleManager
*/
public function init($moduleManager)
{
$moduleManager
->getEventManager()
->attach('mergeConfig', [$this, 'onMergeConfig']);
}
/**
* Perform substitutions in the merged configuration.
*
* Rewrites keys and values matching known ZF classes, namespaces, and
* configuration keys to their Laminas equivalents.
*
* Type-hinting deliberately omitted to allow unit testing
* without dependencies on packages that do not exist yet.
*
* @param ModuleEvent $event
*/
public function onMergeConfig($event)
{
/** @var ConfigMergerInterface */
$configMerger = $event->getConfigListener();
$processor = new ConfigPostProcessor();
$configMerger->setMergedConfig(
$processor(
$configMerger->getMergedConfig($returnAsObject = false)
)
);
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\ZendFrameworkBridge;
class Replacements
{
/** @var string[] */
private $replacements;
public function __construct(array $additionalReplacements = [])
{
$this->replacements = array_merge(
require __DIR__ . '/../config/replacements.php',
$additionalReplacements
);
}
/**
* @param string $value
* @return string
*/
public function replace($value)
{
return strtr($value, $this->replacements);
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
namespace Laminas\ZendFrameworkBridge;
class RewriteRules
{
/**
* @return array
*/
public static function namespaceRewrite()
{
return [
// Expressive
'Zend\\ProblemDetails\\' => 'Mezzio\\ProblemDetails\\',
'Zend\\Expressive\\' => 'Mezzio\\',
// Laminas
'Zend\\' => 'Laminas\\',
'ZF\\ComposerAutoloading\\' => 'Laminas\\ComposerAutoloading\\',
'ZF\\DevelopmentMode\\' => 'Laminas\\DevelopmentMode\\',
// Apigility
'ZF\\Apigility\\' => 'Laminas\\ApiTools\\',
'ZF\\' => 'Laminas\\ApiTools\\',
// ZendXml, API wrappers, zend-http OAuth support, zend-diagnostics, ZendDeveloperTools
'ZendXml\\' => 'Laminas\\Xml\\',
'ZendOAuth\\' => 'Laminas\\OAuth\\',
'ZendDiagnostics\\' => 'Laminas\\Diagnostics\\',
'ZendService\\ReCaptcha\\' => 'Laminas\\ReCaptcha\\',
'ZendService\\Twitter\\' => 'Laminas\\Twitter\\',
'ZendDeveloperTools\\' => 'Laminas\\DeveloperTools\\',
];
}
/**
* @return array
*/
public static function namespaceReverse()
{
return [
// ZendXml, ZendOAuth, ZendDiagnostics, ZendDeveloperTools
'Laminas\\Xml\\' => 'ZendXml\\',
'Laminas\\OAuth\\' => 'ZendOAuth\\',
'Laminas\\Diagnostics\\' => 'ZendDiagnostics\\',
'Laminas\\DeveloperTools\\' => 'ZendDeveloperTools\\',
// Zend Service
'Laminas\\ReCaptcha\\' => 'ZendService\\ReCaptcha\\',
'Laminas\\Twitter\\' => 'ZendService\\Twitter\\',
// Zend
'Laminas\\' => 'Zend\\',
// Expressive
'Mezzio\\ProblemDetails\\' => 'Zend\\ProblemDetails\\',
'Mezzio\\' => 'Zend\\Expressive\\',
// Laminas to ZfCampus
'Laminas\\ComposerAutoloading\\' => 'ZF\\ComposerAutoloading\\',
'Laminas\\DevelopmentMode\\' => 'ZF\\DevelopmentMode\\',
// Apigility
'Laminas\\ApiTools\\Admin\\' => 'ZF\\Apigility\\Admin\\',
'Laminas\\ApiTools\\Doctrine\\' => 'ZF\\Apigility\\Doctrine\\',
'Laminas\\ApiTools\\Documentation\\' => 'ZF\\Apigility\\Documentation\\',
'Laminas\\ApiTools\\Example\\' => 'ZF\\Apigility\\Example\\',
'Laminas\\ApiTools\\Provider\\' => 'ZF\\Apigility\\Provider\\',
'Laminas\\ApiTools\\Welcome\\' => 'ZF\\Apiglity\\Welcome\\',
'Laminas\\ApiTools\\' => 'ZF\\',
];
}
}

View File

@@ -0,0 +1,9 @@
<?php
/**
* @see https://github.com/laminas/laminas-zendframework-bridge for the canonical source repository
* @copyright https://github.com/laminas/laminas-zendframework-bridge/blob/master/COPYRIGHT.md
* @license https://github.com/laminas/laminas-zendframework-bridge/blob/master/LICENSE.md New BSD License
*/
\Laminas\ZendFrameworkBridge\Autoloader::load();

View File

@@ -1,14 +0,0 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Escaper\Exception;
interface ExceptionInterface
{
}

View File

@@ -1,18 +0,0 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Escaper\Exception;
/**
* Invalid argument exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{
}

View File

@@ -1,18 +0,0 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Zend\Escaper\Exception;
/**
* Invalid argument exception
*/
class RuntimeException extends \RuntimeException implements
ExceptionInterface
{
}