Skip to content

Commit

Permalink
Merge pull request #5096 from getkirby/release/3.9.2
Browse files Browse the repository at this point in the history
3.9.2
  • Loading branch information
bastianallgeier authored Mar 8, 2023
2 parents 617a07a + 59b2b2e commit 9ecd11c
Show file tree
Hide file tree
Showing 75 changed files with 1,517 additions and 487 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
with:
fetch-depth: 2

Expand All @@ -66,21 +66,21 @@ jobs:

- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@861c58f0808a7d49515b111c6f780a7085f63973 # pin@v1
uses: shivammathur/cache-extensions@de71cbc3239d9b69ea8558b8609ccd067ab4cf14 # pin@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: php-v1

- name: Cache PHP extensions
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # pin@v2
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # pin@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Cache analysis data
id: finishPrepare
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # pin@v3
with:
path: ~/.cache/psalm
key: backend-analysis-${{ matrix.php }}
Expand All @@ -117,7 +117,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
PHP: ${{ matrix.php }}
if: env.token != ''
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
uses: codecov/codecov-action@858dd794fbb81941b6d60b0dca860878cba60fa9 # pin@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # for better reliability if the GitHub API is down
fail_ci_if_error: true
Expand All @@ -126,8 +126,8 @@ jobs:
env_vars: PHP

- name: Upload code scanning results to GitHub
if: always() && steps.finishPrepare.outcome == 'success'
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # pin@v2
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby'
uses: github/codeql-action/upload-sarif@c39289132c42449a2ebb2332ae25b630d1181eb1 # pin@v2
with:
sarif_file: sarif

Expand All @@ -148,29 +148,29 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3

- name: Preparations
run: mkdir sarif

- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@861c58f0808a7d49515b111c6f780a7085f63973 # pin@v1
uses: shivammathur/cache-extensions@de71cbc3239d9b69ea8558b8609ccd067ab4cf14 # pin@v1
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
key: php-analysis-v1

- name: Cache PHP extensions
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
id: finishPrepare
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # pin@v2
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # pin@v2
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
Expand Down Expand Up @@ -200,8 +200,8 @@ jobs:
run: phpmd . github phpmd.xml.dist --exclude 'dependencies/*,tests/*,vendor/*' --reportfile-sarif sarif/phpmd.sarif

- name: Upload code scanning results to GitHub
if: always() && steps.finishPrepare.outcome == 'success'
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # pin@v2
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby'
uses: github/codeql-action/upload-sarif@c39289132c42449a2ebb2332ae25b630d1181eb1 # pin@v2
with:
sarif_file: sarif

Expand All @@ -215,18 +215,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3

- name: Setup PHP environment
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # pin@v2
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # pin@v2
with:
php-version: ${{ env.php }}
coverage: none
tools: php-cs-fixer:3.13.0

- name: Cache analysis data
id: finishPrepare
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # pin@v3
with:
path: ~/.php-cs-fixer
key: coding-style
Expand All @@ -242,7 +242,7 @@ jobs:
if: >
always() && steps.finishPrepare.outcome == 'success' &&
github.event_name == 'pull_request'
uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e # pin@v1
uses: reviewdog/action-suggester@ab82daa6ea9b84fe43db7747bb10fa087f34e1ab # pin@v1
with:
tool_name: PHP-CS-Fixer
fail_on_error: "true"
10 changes: 5 additions & 5 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3

- name: Set up Node.js problem matchers and cache npm dependencies
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # pin@v3
Expand All @@ -59,7 +59,7 @@ jobs:
# env:
# token: ${{ secrets.CODECOV_TOKEN }}
# if: env.token != ''
# uses: codecov/codecov-action@66b3de25f6f91f65eb92c514d31d6b6f13d5ab18 # pin@v3
# uses: codecov/codecov-action@858dd794fbb81941b6d60b0dca860878cba60fa9 # pin@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # for better reliability if the GitHub API is down
# fail_ci_if_error: true
Expand All @@ -76,7 +76,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3

- name: Set up Node.js problem matchers and cache npm dependencies
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # pin@v3
Expand All @@ -101,7 +101,7 @@ jobs:
if: >
always() && steps.finishPrepare.outcome == 'success' &&
github.event_name == 'pull_request'
uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e # pin@v1
uses: reviewdog/action-suggester@ab82daa6ea9b84fe43db7747bb10fa087f34e1ab # pin@v1
with:
tool_name: ESLint
fail_on_error: "true"
Expand All @@ -118,7 +118,7 @@ jobs:
if: >
always() && steps.finishPrepare.outcome == 'success' &&
github.event_name == 'pull_request'
uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e # pin@v1
uses: reviewdog/action-suggester@ab82daa6ea9b84fe43db7747bb10fa087f34e1ab # pin@v1
with:
tool_name: Prettier
fail_on_error: "true"
18 changes: 9 additions & 9 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
with:
path: kirby

- name: Checkout Sandbox
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
with:
repository: getkirby/sandbox
path: sandbox
Expand All @@ -70,28 +70,28 @@ jobs:
- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@861c58f0808a7d49515b111c6f780a7085f63973 # pin@v1
uses: shivammathur/cache-extensions@de71cbc3239d9b69ea8558b8609ccd067ab4cf14 # pin@v1
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
key: e2e-v1

- name: Cache PHP extensions
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # pin@v3
uses: actions/cache@6998d139ddd3e68c71e9e398d8e40b71a2f39812 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # pin@v2
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # pin@v2
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
coverage: none

- name: Install dependencies
uses: cypress-io/github-action@c5724eda82337bcff977ce14509f47052c12e04c # pin@v5
uses: cypress-io/github-action@327178c8042fbb3be13870105eece3c8abf348c9 # pin@v5
with:
working-directory: kirby/panel
runTests: false
Expand All @@ -105,7 +105,7 @@ jobs:
working-directory: kirby/panel

- name: Run tests
uses: cypress-io/github-action@c5724eda82337bcff977ce14509f47052c12e04c # pin@v5
uses: cypress-io/github-action@327178c8042fbb3be13870105eece3c8abf348c9 # pin@v5
with:
working-directory: kirby/panel
install: false
Expand All @@ -124,14 +124,14 @@ jobs:
- name: Archive Cypress screenshots
if: failure()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # pin@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3
with:
name: cypress-screenshots
path: kirby/panel/cypress/screenshots

- name: Archive Cypress videos
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # pin@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3
with:
name: cypress-videos
path: kirby/panel/cypress/videos
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@9c1b1c6e115ca2af09755448e0dbba24e5061cc8 # pin@v5
- uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b # pin@v7
with:
# Idle number of days before marking issues stale, set `-1` to disable
days-before-issue-stale: 180
Expand Down
2 changes: 1 addition & 1 deletion 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.9.1",
"version": "3.9.2",
"keywords": [
"kirby",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

16 changes: 9 additions & 7 deletions config/methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
try {
$blocks = Blocks::parse($field->value());
$blocks = Blocks::factory($blocks, [
'parent' => $field->parent()
'parent' => $field->parent(),
'field' => $field,
]);
return $blocks->filter('isHidden', false);
} catch (Throwable) {
Expand Down Expand Up @@ -192,7 +193,8 @@
*/
'toLayouts' => function (Field $field) {
return Layouts::factory(Layouts::parse($field->value()), [
'parent' => $field->parent()
'parent' => $field->parent(),
'field' => $field,
]);
},

Expand Down Expand Up @@ -276,10 +278,10 @@
* Converts the field value to a Unix timestamp
*
* @param \Kirby\Cms\Field $field
* @return int
* @return int|false
*/
'toTimestamp' => function (Field $field): int {
return strtotime($field->value);
'toTimestamp' => function (Field $field): int|false {
return strtotime($field->value ?? '');
},

/**
Expand Down Expand Up @@ -394,7 +396,7 @@
// Obsolete elements, script tags, image maps and form elements have
// been excluded for safety reasons and as they are most likely not
// needed in most cases.
$field->value = strip_tags($field->value, Html::$inlineList);
$field->value = strip_tags($field->value ?? '', Html::$inlineList);
return $field;
},

Expand Down Expand Up @@ -481,7 +483,7 @@
* @return \Kirby\Cms\Field
*/
'nl2br' => function (Field $field) {
$field->value = nl2br($field->value, false);
$field->value = nl2br($field->value ?? '', false);
return $field;
},

Expand Down
5 changes: 5 additions & 0 deletions config/sections/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
// search
if ($this->search === true && empty($this->searchterm()) === false) {
$files = $files->search($this->searchterm());

// disable flip and sortBy while searching
// to show most relevant results
$this->flip = false;
$this->sortBy = null;
}

// sort
Expand Down
5 changes: 5 additions & 0 deletions config/sections/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
// search
if ($this->search === true && empty($this->searchterm()) === false) {
$pages = $pages->search($this->searchterm());

// disable flip and sortBy while searching
// to show most relevant results
$this->flip = false;
$this->sortBy = null;
}

// sort
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Forgot your password?",
"login.toggleText.password-reset.email-password": "← Back to login",

"logout": "Tancar sessi\u00f3",
"logout": "Tancar sessió",

"menu": "Menú",
"meridiem": "AM/PM",
Expand Down
2 changes: 1 addition & 1 deletion i18n/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"login.toggleText.password-reset.email": "Zapomenuté heslo?",
"login.toggleText.password-reset.email-password": "← Zpět na přihlášení",

"logout": "Odhl\u00e1sit se",
"logout": "Odhlásit se",

"menu": "Menu",
"meridiem": "AM/PM",
Expand Down
Loading

0 comments on commit 9ecd11c

Please sign in to comment.