Skip to content

Commit 2ff182b

Browse files
Merge pull request #7313 from getkirby/release/5.0.0
5.0.0
2 parents 5292c17 + 9f28378 commit 2ff182b

File tree

1,679 files changed

+74137
-35261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,679 files changed

+74137
-35261
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ insert_final_newline = true
2121
indent_size = 2
2222
insert_final_newline = false
2323

24+
[views/**/*.php]
25+
indent_size = 2
26+
insert_final_newline = false
27+
2428
[*.yml]
2529
indent_style = space
2630

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
.php-cs-fixer.dist.php export-ignore
99
phpbench.json export-ignore
1010
phpmd.xml.dist export-ignore
11-
phpunit.xml.dist export-ignore
11+
phpunit.ci.xml export-ignore
12+
phpunit.dist.xml export-ignore
1213
psalm.xml.dist export-ignore
1314
bench/ export-ignore
1415
tests/ export-ignore

.github/workflows/backend.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,43 +57,48 @@ jobs:
5757
timeout-minutes: 5
5858
strategy:
5959
matrix:
60-
php: ["8.1", "8.2", "8.3", "8.4"]
60+
php: ["8.2", "8.3", "8.4"]
6161
env:
62-
extensions: mbstring, ctype, curl, gd, apcu, memcached
62+
extensions: mbstring, ctype, curl, gd, apcu, memcached, redis
6363
ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""
6464

6565
steps:
6666
- name: Checkout
67-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
67+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
6868
with:
6969
fetch-depth: 2
7070

7171
- name: Preparations
7272
run: mkdir sarif
7373

7474
- name: Install memcached
75-
uses: niden/actions-memcached@3b3ecd9d0d035ea92db716dc1540a7dbe9e56349 # v7
75+
uses: niden/actions-memcached@3b3ecd9d0d035ea92db716dc1540a7dbe9e56349 # pin@v7
76+
77+
- name: Install redis
78+
uses: supercharge/redis-github-action@ea9b21c6ecece47bd99595c532e481390ea0f044 # pin@v1
79+
with:
80+
redis-version: 7
7681

7782
- name: Install system locales
7883
run: sudo apt-get update && sudo apt-get install -y locales-all
7984

8085
- name: Setup PHP cache environment
8186
id: ext-cache
82-
uses: shivammathur/cache-extensions@d814e887327271b6e290b018d51bba9f62590488 # v1
87+
uses: shivammathur/cache-extensions@d814e887327271b6e290b018d51bba9f62590488 # pin@v1
8388
with:
8489
php-version: ${{ matrix.php }}
8590
extensions: ${{ env.extensions }}
8691
key: php-v1
8792

8893
- name: Cache PHP extensions
89-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
94+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # pin@v4
9095
with:
9196
path: ${{ steps.ext-cache.outputs.dir }}
9297
key: ${{ steps.ext-cache.outputs.key }}
9398
restore-keys: ${{ steps.ext-cache.outputs.key }}
9499

95100
- name: Setup PHP environment
96-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2
101+
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # pin@v2
97102
with:
98103
php-version: ${{ matrix.php }}
99104
extensions: ${{ env.extensions }}
@@ -108,7 +113,7 @@ jobs:
108113
109114
- name: Cache analysis data
110115
id: finishPrepare
111-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
116+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # pin@v4
112117
with:
113118
path: ~/.cache/psalm
114119
key: backend-analysis-${{ matrix.php }}
@@ -119,7 +124,7 @@ jobs:
119124

120125
- name: Run tests
121126
if: always() && steps.finishPrepare.outcome == 'success'
122-
run: phpunit --fail-on-skipped --coverage-clover ${{ github.workspace }}/clover.xml
127+
run: phpunit -c phpunit.ci.xml --coverage-clover ${{ github.workspace }}/clover.xml
123128

124129
- name: Statically analyze using Psalm
125130
if: always() && steps.finishPrepare.outcome == 'success' && matrix.php != '8.4'
@@ -130,7 +135,7 @@ jobs:
130135
token: ${{ secrets.CODECOV_TOKEN }}
131136
PHP: ${{ matrix.php }}
132137
if: env.token != ''
133-
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
138+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # pin@v5
134139
with:
135140
token: ${{ secrets.CODECOV_TOKEN }} # for better reliability if the GitHub API is down
136141
fail_ci_if_error: true
@@ -140,7 +145,7 @@ jobs:
140145

141146
- name: Upload code scanning results to GitHub
142147
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby' && matrix.php != '8.4'
143-
uses: github/codeql-action/upload-sarif@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
148+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # pin@v3
144149
with:
145150
sarif_file: sarif
146151

@@ -167,34 +172,34 @@ jobs:
167172
runs-on: ubuntu-22.04
168173
timeout-minutes: 5
169174
env:
170-
php: "8.1"
171-
extensions: mbstring, ctype, curl, gd, apcu, memcached
175+
php: "8.2"
176+
extensions: mbstring, ctype, curl, gd, apcu, memcached, redis
172177

173178
steps:
174179
- name: Checkout
175-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
180+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
176181

177182
- name: Preparations
178183
run: mkdir sarif
179184

180185
- name: Setup PHP cache environment
181186
id: ext-cache
182-
uses: shivammathur/cache-extensions@d814e887327271b6e290b018d51bba9f62590488 # v1
187+
uses: shivammathur/cache-extensions@d814e887327271b6e290b018d51bba9f62590488 # pin@v1
183188
with:
184189
php-version: ${{ env.php }}
185190
extensions: ${{ env.extensions }}
186191
key: php-analysis-v1
187192

188193
- name: Cache PHP extensions
189-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
194+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # pin@v4
190195
with:
191196
path: ${{ steps.ext-cache.outputs.dir }}
192197
key: ${{ steps.ext-cache.outputs.key }}
193198
restore-keys: ${{ steps.ext-cache.outputs.key }}
194199

195200
- name: Setup PHP environment
196201
id: finishPrepare
197-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2
202+
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # pin@v2
198203
with:
199204
php-version: ${{ env.php }}
200205
extensions: ${{ env.extensions }}
@@ -221,7 +226,7 @@ jobs:
221226

222227
- name: Upload code scanning results to GitHub
223228
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby'
224-
uses: github/codeql-action/upload-sarif@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2
229+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # pin@v3
225230
with:
226231
sarif_file: sarif
227232

@@ -248,22 +253,22 @@ jobs:
248253
runs-on: ubuntu-22.04
249254
timeout-minutes: 5
250255
env:
251-
php: "8.1"
256+
php: "8.2"
252257

253258
steps:
254259
- name: Checkout
255-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
260+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
256261

257262
- name: Setup PHP environment
258-
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2
263+
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # pin@v2
259264
with:
260265
php-version: ${{ env.php }}
261266
coverage: none
262-
tools: php-cs-fixer:3.52.1
267+
tools: php-cs-fixer:3.65.0
263268

264269
- name: Cache analysis data
265270
id: finishPrepare
266-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
271+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # pin@v4
267272
with:
268273
path: ~/.php-cs-fixer
269274
key: coding-style

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
runs-on: ubuntu-22.04
9090
timeout-minutes: 5
9191
env:
92-
php: "8.1"
92+
php: "8.2"
9393

9494
steps:
9595
- name: Checkout

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# tests
1818
.phpbench
1919
.phpunit.cache
20+
phpunit.xml
2021
/tests/coverage
2122
/tests/tmp
2223

.php-cs-fixer.dist.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
return $config
1010
->setRules([
1111
'@PSR12' => true,
12-
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
12+
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
1313
'array_indentation' => true,
1414
'array_syntax' => ['syntax' => 'short'],
15+
'assign_null_coalescing_to_coalesce_equal' => true,
1516
'cast_spaces' => ['space' => 'none'],
16-
// 'class_keyword_remove' => true, // replaces static::class with 'static' (won't work)
1717
'combine_consecutive_issets' => true,
1818
'combine_consecutive_unsets' => true,
1919
'combine_nested_dirname' => true,
@@ -23,8 +23,6 @@
2323
'function_typehint_space' => true,
2424
'include' => true,
2525
'logical_operators' => true,
26-
'lowercase_cast' => true,
27-
'lowercase_static_reference' => true,
2826
'magic_constant_casing' => true,
2927
'magic_method_casing' => true,
3028
'method_chaining_indentation' => true,
@@ -33,29 +31,40 @@
3331
'native_function_casing' => true,
3432
'native_function_type_declaration_casing' => true,
3533
'new_with_braces' => true,
36-
'no_blank_lines_after_class_opening' => true,
3734
'no_blank_lines_after_phpdoc' => true,
3835
'no_empty_comment' => true,
3936
'no_empty_phpdoc' => true,
4037
'no_empty_statement' => true,
4138
'no_leading_namespace_whitespace' => true,
4239
'no_mixed_echo_print' => ['use' => 'echo'],
40+
'no_short_bool_cast' => true,
41+
'no_superfluous_elseif' => true,
42+
'no_superfluous_phpdoc_tags' => ['allow_unused_params' => true],
43+
'no_unneeded_braces' => true,
4344
'no_unneeded_control_parentheses' => true,
45+
'no_unneeded_import_alias' => true,
4446
'no_unused_imports' => true,
47+
'no_useless_else' => true,
48+
'no_useless_nullsafe_operator' => true,
4549
'no_useless_return' => true,
50+
'no_whitespace_before_comma_in_array' => true,
4651
'nullable_type_declaration' => ['syntax' => 'union'],
4752
'nullable_type_declaration_for_default_null_value' => true,
53+
'object_operator_without_whitespace' => true,
54+
'operator_linebreak' => ['position' => 'end', 'only_booleans' => true],
4855
'ordered_imports' => ['sort_algorithm' => 'alpha'],
4956
'ordered_types' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
50-
// 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], // adds params in the wrong order
5157
'phpdoc_align' => ['align' => 'left'],
5258
'phpdoc_indent' => true,
59+
'phpdoc_param_order' => true,
5360
'phpdoc_scalar' => true,
5461
'phpdoc_trim' => true,
55-
'short_scalar_cast' => true,
62+
'php_unit_fqcn_annotation' => true,
5663
'single_line_comment_style' => true,
5764
'single_quote' => true,
65+
'statement_indentation' => ['stick_comment_to_next_continuous_control_statement' => true],
5866
'ternary_to_null_coalescing' => true,
67+
'trim_array_spaces' => true,
5968
'whitespace_after_comma_in_array' => true
6069
])
6170
->setRiskyAllowed(true)

bootstrap.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* stop at older or too recent versions
66
*/
77
if (
8-
version_compare(PHP_VERSION, '8.1.0', '>=') === false ||
8+
version_compare(PHP_VERSION, '8.2.0', '>=') === false ||
99
version_compare(PHP_VERSION, '8.5.0', '<') === false
1010
) {
1111
die(include __DIR__ . '/views/php.php');
@@ -27,10 +27,9 @@
2727
* @psalm-suppress MissingFile
2828
*/
2929
include $autoloader;
30-
} else {
31-
/**
32-
* If neither one exists, don't bother searching;
33-
* it's a custom directory setup and the users need to
34-
* load the autoloader themselves
35-
*/
3630
}
31+
/**
32+
* If neither one exists, don't bother searching;
33+
* it's a custom directory setup and the users need to
34+
* load the autoloader themselves
35+
*/

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "The Kirby core",
44
"license": "proprietary",
55
"type": "kirby-cms",
6-
"version": "4.8.0",
6+
"version": "5.0.0",
77
"keywords": [
88
"kirby",
99
"cms",
@@ -24,7 +24,7 @@
2424
"source": "https://github.com/getkirby/kirby"
2525
},
2626
"require": {
27-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
27+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
2828
"ext-SimpleXML": "*",
2929
"ext-ctype": "*",
3030
"ext-curl": "*",
@@ -39,14 +39,14 @@
3939
"christian-riesen/base32": "1.6.0",
4040
"claviska/simpleimage": "4.2.1",
4141
"composer/semver": "3.4.3",
42-
"filp/whoops": "2.18.0",
42+
"filp/whoops": "2.18.3",
4343
"getkirby/composer-installer": "^1.2.1",
4444
"laminas/laminas-escaper": "2.17.0",
4545
"michelf/php-smartypants": "1.8.1",
4646
"phpmailer/phpmailer": "6.10.0",
4747
"symfony/polyfill-intl-idn": "1.32.0",
4848
"symfony/polyfill-mbstring": "1.32.0",
49-
"symfony/yaml": "6.4.21"
49+
"symfony/yaml": "7.3.0"
5050
},
5151
"replace": {
5252
"symfony/polyfill-php72": "*"
@@ -58,6 +58,7 @@
5858
"ext-fileinfo": "Improved mime type detection for files",
5959
"ext-intl": "Improved i18n number formatting",
6060
"ext-memcached": "Support for the Memcached cache driver",
61+
"ext-redis": "Support for the Redis cache driver",
6162
"ext-sodium": "Support for the crypto class and more robust session handling",
6263
"ext-zip": "Support for ZIP archive file functions",
6364
"ext-zlib": "Sanitization and validation for svgz files"
@@ -80,7 +81,7 @@
8081
},
8182
"optimize-autoloader": true,
8283
"platform": {
83-
"php": "8.1.0"
84+
"php": "8.2.0"
8485
},
8586
"platform-check": false
8687
},

0 commit comments

Comments
 (0)