Skip to content

Commit

Permalink
Merge pull request #4766 from getkirby/release/3.8.0
Browse files Browse the repository at this point in the history
3.8.0
  • Loading branch information
bastianallgeier authored Oct 6, 2022
2 parents c7f52c4 + b5585ff commit 3e5899b
Show file tree
Hide file tree
Showing 541 changed files with 36,282 additions and 23,846 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
php: ["7.4", "8.0", "8.1"]
php: ["8.0", "8.1"]
env:
extensions: mbstring, ctype, curl, gd, apcu, memcached
ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
days-before-close: 14

# Comment on the staled issues
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs."
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. This is for us to prioritize issues that are still relevant to our community. It will be closed if no further activity occurs within the next 14 days. If this issue is still relevant to you, please leave a comment."

# Label to apply on staled issues
stale-issue-label: "type: stale 💤"

# Reason to use when closing issues
close-issue-reason: not_planned

Expand Down
33 changes: 18 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@
/vendor/**/.*
/vendor/**/test/*
/vendor/**/tests/*
/vendor/*/*/*.md
!/vendor/*/*/COPYRIGHT.md
!/vendor/*/*/LICENSE.md
/vendor/*/*/*.dist
/vendor/*/*/*.txt
/vendor/*/*/*.xml
/vendor/*/*/*.yml
/vendor/*/*/*.yaml
/vendor/*/*/COMMITMENT
/vendor/*/*/readme.php
/vendor/*/*/VERSION
/vendor/*/*/docs/*
/vendor/*/*/example/*
/vendor/*/*/examples/*
/vendor/*/*/php4/*
/vendor/**/*.md
!/vendor/**/COPYRIGHT.md
!/vendor/**/LICENSE.md
/vendor/**/*.dist
/vendor/**/*.txt
/vendor/**/*.xml
/vendor/**/*.yml
/vendor/**/*.yaml
/vendor/**/COMMITMENT
/vendor/**/readme.php
/vendor/**/VERSION
/vendor/**/docs/*
/vendor/**/example/*
/vendor/**/examples/*
/vendor/**/php4/*
/vendor/**/*.pubkey
/vendor/**/*.asc
/vendor/**/*.sh
/vendor/getkirby/composer-installer
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* stop at older or too recent versions
*/
if (
version_compare(PHP_VERSION, '7.4.0', '>=') === false ||
version_compare(PHP_VERSION, '8.0.0', '>=') === false ||
version_compare(PHP_VERSION, '8.2.0', '<') === false
) {
die(include __DIR__ . '/views/php.php');
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "The Kirby 3 core",
"license": "proprietary",
"type": "kirby-cms",
"version": "3.7.5",
"version": "3.8.0",
"keywords": [
"kirby",
"cms",
Expand All @@ -24,7 +24,7 @@
"source": "https://github.com/getkirby/kirby"
},
"require": {
"php": ">=7.4.0 <8.2.0",
"php": ">=8.0.0 <8.2.0",
"ext-SimpleXML": "*",
"ext-ctype": "*",
"ext-curl": "*",
Expand All @@ -37,6 +37,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"claviska/simpleimage": "3.7.0",
"composer/semver": "3.3.2",
"filp/whoops": "2.14.5",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.10.0",
Expand Down Expand Up @@ -76,7 +77,7 @@
},
"optimize-autoloader": true,
"platform": {
"php": "7.4.0"
"php": "8.0.0"
},
"platform-check": false
},
Expand Down
105 changes: 93 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion config/aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
'cookie' => 'Kirby\Http\Cookie',
'header' => 'Kirby\Http\Header',
'remote' => 'Kirby\Http\Remote',
'server' => 'Kirby\Http\Server',

// image classes
'dimensions' => 'Kirby\Image\Dimensions',
Expand Down
45 changes: 7 additions & 38 deletions config/api/models/Page.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Kirby\Cms\Helpers;
use Kirby\Cms\Page;
use Kirby\Form\Form;

Expand All @@ -21,43 +20,13 @@
'hasFiles' => fn (Page $page) => $page->hasFiles(),
'id' => fn (Page $page) => $page->id(),
'isSortable' => fn (Page $page) => $page->isSortable(),
/**
* @deprecated 3.6.0
* @todo Remove in 3.8.0
* @codeCoverageIgnore
*/
'next' => function (Page $page) {
Helpers::deprecated('The API field page.next has been deprecated and will be removed in 3.8.0.');

return $page
->nextAll()
->filter('intendedTemplate', $page->intendedTemplate())
->filter('status', $page->status())
->filter('isReadable', true)
->first();
},
'num' => fn (Page $page) => $page->num(),
'options' => fn (Page $page) => $page->panel()->options(['preview']),
'panelImage' => fn (Page $page) => $page->panel()->image(),
'parent' => fn (Page $page) => $page->parent(),
'parents' => fn (Page $page) => $page->parents()->flip(),
/**
* @deprecated 3.6.0
* @todo Remove in 3.8.0
* @codeCoverageIgnore
*/
'prev' => function (Page $page) {
Helpers::deprecated('The API field page.prev has been deprecated and will be removed in 3.8.0.');

return $page
->prevAll()
->filter('intendedTemplate', $page->intendedTemplate())
->filter('status', $page->status())
->filter('isReadable', true)
->last();
},
'previewUrl' => fn (Page $page) => $page->previewUrl(),
'siblings' => function (Page $page) {
'num' => fn (Page $page) => $page->num(),
'options' => fn (Page $page) => $page->panel()->options(['preview']),
'panelImage' => fn (Page $page) => $page->panel()->image(),
'parent' => fn (Page $page) => $page->parent(),
'parents' => fn (Page $page) => $page->parents()->flip(),
'previewUrl' => fn (Page $page) => $page->previewUrl(),
'siblings' => function (Page $page) {
if ($page->isDraft() === true) {
return $page->parentModel()->children()->not($page);
} else {
Expand Down
21 changes: 8 additions & 13 deletions config/api/models/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,23 @@
'slugs' => fn () => Str::$language,
'title' => fn () => $this->site()->title()->value(),
'translation' => function () {
if ($user = $this->user()) {
$translationCode = $user->language();
} else {
$translationCode = $this->kirby()->panelLanguage();
}
$code = $this->user()?->language() ??
$this->kirby()->panelLanguage();

if ($translation = $this->kirby()->translation($translationCode)) {
if ($translation = $this->kirby()->translation($code)) {
return $translation;
} else {
return $this->kirby()->translation('en');
}

return $this->kirby()->translation('en');
},
'kirbytext' => fn () => $this->kirby()->option('panel.kirbytext') ?? true,
'user' => fn () => $this->user(),
'version' => function () {
$user = $this->user();

if ($user && $user->role()->permissions()->for('access', 'system') === true) {
if ($this->user()?->role()->permissions()->for('access', 'system') === true) {
return $this->kirby()->version();
} else {
return null;
}

return null;
}
],
'type' => 'Kirby\Cms\System',
Expand Down
Loading

0 comments on commit 3e5899b

Please sign in to comment.