Skip to content

Commit

Permalink
Merge pull request #5005 from getkirby/release/3.9
Browse files Browse the repository at this point in the history
3.9
  • Loading branch information
bastianallgeier authored Jan 17, 2023
2 parents d8a3654 + 17cdacd commit 1f41e1e
Show file tree
Hide file tree
Showing 421 changed files with 7,296 additions and 5,049 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
php: ["8.0", "8.1"]
php: ["8.0", "8.1", "8.2"]
env:
extensions: mbstring, ctype, curl, gd, apcu, memcached
ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ We will review all pull requests (PRs) to `develop` and merge them if accepted,

### Report a bug

When you find a bug, the first step to fixing it is to help us understand and reproduce the bug as best as possible. When you create a bug report, please include as many details as possible. Fill out [the template](ISSUE_TEMPLATE/bug_report.md) because the requested information helps us resolve issues so much faster.
When you find a bug, the first step to fixing it is to help us understand and reproduce the bug as best as possible. When you create a bug report, please include as many details as possible. Fill out [the template](https://github.com/getkirby/kirby/issues/new?template=bug_report.md) because the requested information helps us resolve issues so much faster.

### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
if (
version_compare(PHP_VERSION, '8.0.0', '>=') === false ||
version_compare(PHP_VERSION, '8.2.0', '<') === false
version_compare(PHP_VERSION, '8.3.0', '<') === false
) {
die(include __DIR__ . '/views/php.php');
}
Expand Down
15 changes: 8 additions & 7 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.8.4",
"version": "3.9.0",
"keywords": [
"kirby",
"cms",
Expand All @@ -24,7 +24,7 @@
"source": "https://github.com/getkirby/kirby"
},
"require": {
"php": ">=8.0.0 <8.2.0",
"php": ">=8.0.0 <8.3.0",
"ext-SimpleXML": "*",
"ext-ctype": "*",
"ext-curl": "*",
Expand All @@ -36,15 +36,15 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"claviska/simpleimage": "3.7.0",
"claviska/simpleimage": "3.7.2",
"composer/semver": "3.3.2",
"filp/whoops": "2.14.6",
"getkirby/composer-installer": "^1.2.1",
"laminas/laminas-escaper": "2.12.0",
"michelf/php-smartypants": "1.8.1",
"phpmailer/phpmailer": "6.6.5",
"symfony/polyfill-intl-idn": "1.26.0",
"symfony/polyfill-mbstring": "1.26.0"
"phpmailer/phpmailer": "6.7.1",
"symfony/polyfill-intl-idn": "1.27.0",
"symfony/polyfill-mbstring": "1.27.0"
},
"replace": {
"symfony/polyfill-php72": "*"
Expand Down Expand Up @@ -105,7 +105,8 @@
"@test"
],
"fix": "php-cs-fixer fix",
"test": "phpunit --stderr --coverage-html=tests/coverage",
"test": "phpunit --stderr",
"test:coverage": "phpunit --stderr --coverage-html=tests/coverage",
"zip": "composer archive --format=zip --file=dist"
}
}
66 changes: 34 additions & 32 deletions composer.lock

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

5 changes: 5 additions & 0 deletions config/aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
// panel classes
'panel' => 'Kirby\Panel\Panel',

// template classes
'snippet' => 'Kirby\Template\Snippet',
'slot' => 'Kirby\Template\Slot',

// toolkit classes
'a' => 'Kirby\Toolkit\A',
'c' => 'Kirby\Toolkit\Config',
Expand All @@ -73,6 +77,7 @@
'kirby\cms\form' => 'Kirby\Form\Form',
'kirby\cms\kirbytag' => 'Kirby\Text\KirbyTag',
'kirby\cms\kirbytags' => 'Kirby\Text\KirbyTags',
'kirby\cms\template' => 'Kirby\Template\Template',
'kirby\toolkit\dir' => 'Kirby\Filesystem\Dir',
'kirby\toolkit\f' => 'Kirby\Filesystem\F',
'kirby\toolkit\file' => 'Kirby\Filesystem\File',
Expand Down
5 changes: 3 additions & 2 deletions config/api/models/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
$code = $this->user()?->language() ??
$this->kirby()->panelLanguage();

return $this->kirby()->translation($code) ??
$this->kirby()->translation('en');
return
$this->kirby()->translation($code) ??
$this->kirby()->translation('en');
},
'kirbytext' => fn () => $this->kirby()->option('panel.kirbytext') ?? true,
'user' => fn () => $this->user(),
Expand Down
10 changes: 7 additions & 3 deletions config/api/routes/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@
// move_uploaded_file() not working with unit test
// @codeCoverageIgnoreStart
return $this->upload(function ($source, $filename) use ($path) {
return $this->parent($path)->createFile([
$props = [
'content' => [
'sort' => $this->requestBody('sort')
],
'source' => $source,
'template' => $this->requestBody('template'),
'filename' => $filename
]);
];

// move the source file from the temp dir
return $this->parent($path)->createFile($props, true);
});
// @codeCoverageIgnoreEnd
}
Expand Down Expand Up @@ -95,8 +98,9 @@
'pattern' => $pattern . '/files/(:any)',
'method' => 'POST',
'action' => function (string $path, string $filename) {
// move the source file from the temp dir
return $this->upload(
fn ($source) => $this->file($path, $filename)->replace($source)
fn ($source) => $this->file($path, $filename)->replace($source, true)
);
}
],
Expand Down
15 changes: 13 additions & 2 deletions config/api/routes/lock.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
/**
* Content Lock Routes
*/

use Kirby\Exception\NotFoundException;

return [
[
'pattern' => '(:all)/lock',
Expand All @@ -25,7 +28,11 @@
'pattern' => '(:all)/lock',
'method' => 'DELETE',
'action' => function (string $path) {
return $this->parent($path)->lock()?->remove();
try {
return $this->parent($path)->lock()?->remove();
} catch (NotFoundException) {
return true;
}
}
],
[
Expand All @@ -39,7 +46,11 @@
'pattern' => '(:all)/unlock',
'method' => 'DELETE',
'action' => function (string $path) {
return $this->parent($path)->lock()?->resolve();
try {
return $this->parent($path)->lock()?->resolve();
} catch (NotFoundException) {
return true;
}
}
],
];
Loading

0 comments on commit 1f41e1e

Please sign in to comment.