Upgrade to 3.7.0

This commit is contained in:
Bastian Allgeier
2022-06-27 10:02:22 +02:00
parent 0751a6510d
commit 1c22148d7b
674 changed files with 5052 additions and 3082 deletions

0
kirby/config/api/routes/auth.php Normal file → Executable file
View File

0
kirby/config/api/routes/files.php Normal file → Executable file
View File

0
kirby/config/api/routes/languages.php Normal file → Executable file
View File

47
kirby/config/api/routes/lock.php Normal file → Executable file
View File

@@ -5,29 +5,6 @@
* Content Lock Routes
*/
return [
[
'pattern' => '(:all)/lock',
'method' => 'GET',
/**
* @deprecated 3.6.0
* @todo Remove in 3.7.0
*/
'action' => function (string $path) {
deprecated('The `GET (:all)/lock` API endpoint has been deprecated and will be removed in 3.7.0');
if ($lock = $this->parent($path)->lock()) {
return [
'supported' => true,
'locked' => $lock->get()
];
}
return [
'supported' => false,
'locked' => null
];
}
],
[
'pattern' => '(:all)/lock',
'method' => 'PATCH',
@@ -46,30 +23,6 @@ return [
}
}
],
[
'pattern' => '(:all)/unlock',
'method' => 'GET',
/**
* @deprecated 3.6.0
* @todo Remove in 3.7.0
*/
'action' => function (string $path) {
deprecated('The `GET (:all)/unlock` API endpoint has been deprecated and will be removed in 3.7.0');
if ($lock = $this->parent($path)->lock()) {
return [
'supported' => true,
'unlocked' => $lock->isUnlocked()
];
}
return [
'supported' => false,
'unlocked' => null
];
}
],
[
'pattern' => '(:all)/unlock',
'method' => 'PATCH',

15
kirby/config/api/routes/pages.php Normal file → Executable file
View File

@@ -1,5 +1,6 @@
<?php
/**
* Page Routes
*/
@@ -34,21 +35,9 @@ return [
}
],
[
'pattern' => [
'pages/(:any)/blueprints',
/**
* @deprecated
* @todo remove in 3.7.0
*/
'pages/(:any)/children/blueprints',
],
'pattern' => 'pages/(:any)/blueprints',
'method' => 'GET',
'action' => function (string $id) {
// @codeCoverageIgnoreStart
if ($this->route->pattern() === 'pages/([a-zA-Z0-9\.\-_%= \+\@\(\)]+)/children/blueprints') {
deprecated('`GET pages/(:any)/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET pages/(:any)/blueprints` instead');
}
// @codeCoverageIgnoreEnd
return $this->page($id)->blueprints($this->requestQuery('section'));
}
],

10
kirby/config/api/routes/roles.php Normal file → Executable file
View File

@@ -8,13 +8,15 @@ return [
'pattern' => 'roles',
'method' => 'GET',
'action' => function () {
switch (get('canBe')) {
$kirby = $this->kirby();
switch ($kirby->request()->get('canBe')) {
case 'changed':
return $this->kirby()->roles()->canBeChanged();
return $kirby->roles()->canBeChanged();
case 'created':
return $this->kirby()->roles()->canBeCreated();
return $kirby->roles()->canBeCreated();
default:
return $this->kirby()->roles();
return $kirby->roles();
}
}
],

15
kirby/config/api/routes/site.php Normal file → Executable file
View File

@@ -1,5 +1,6 @@
<?php
/**
* Site Routes
*/
@@ -47,21 +48,9 @@ return [
}
],
[
'pattern' => [
'site/blueprints',
/**
* @deprecated
* @todo remove in 3.7.0
*/
'site/children/blueprints',
],
'pattern' => 'site/blueprints',
'method' => 'GET',
'action' => function () {
// @codeCoverageIgnoreStart
if ($this->route->pattern() === 'site/children/blueprints') {
deprecated('`GET site/children/blueprints` API endpoint has been deprecated and will be removed in 3.7.0. Use `GET site/blueprints` instead.');
}
// @codeCoverageIgnoreEnd
return $this->site()->blueprints($this->requestQuery('section'));
}
],

0
kirby/config/api/routes/system.php Normal file → Executable file
View File

0
kirby/config/api/routes/translations.php Normal file → Executable file
View File

0
kirby/config/api/routes/users.php Normal file → Executable file
View File