Skip to content

Commit d0590ae

Browse files
committed
Test on PHP 8.5
1 parent 2805992 commit d0590ae

4 files changed

Lines changed: 26 additions & 10 deletions

File tree

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# https://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
indent_size = 2

.github/workflows/php.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77

88
strategy:
99
matrix:
10-
php: [ '8.1', '8.2', '8.3', '8.4' ]
10+
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
1111

1212
services:
1313
mysql:
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
3636

3737
# Docs: https://github.com/shivammathur/setup-php
3838
- name: Setup PHP
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Perform static analysis
5656
run: composer analyze -- --error-format=github
57-
if: ${{ matrix.php == '8.4' }}
57+
if: ${{ matrix.php == '8.5' }}
5858

5959
- name: Run PHPUnit
6060
run: composer test-without-mssql
@@ -63,4 +63,4 @@ jobs:
6363

6464
- name: Check Formatting
6565
run: vendor/bin/php-cs-fixer fix -v --dry-run --stop-on-violation --using-cache=no
66-
if: ${{ matrix.php == '8.4' }}
66+
if: ${{ matrix.php == '8.5' }}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"shrikeh/teapot": "^3.0"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "^3.86",
28-
"phpstan/phpstan": "^2.1.22",
27+
"friendsofphp/php-cs-fixer": "^3.91",
28+
"phpstan/phpstan": "^2.1.32",
2929
"phpunit/phpunit": "^10.5"
3030
},
3131
"autoload": {

src/Helpers.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,11 @@ public static function getFieldPropMap(array $fields, array $propMap): array
191191

192192
if ($data->nullGroup) {
193193
// check if any selected field is a child
194-
$parents = $data->parents;
195-
$parent = $parents[array_key_last($parents)];
196-
$length = strlen($parent);
194+
assert($data->parents !== []);
195+
$parent = $data->parents[array_key_last($data->parents)];
197196

198197
foreach ($fieldProps as $field => $_val) {
199-
if (substr($field, 0, $length) === $parent) {
198+
if (str_starts_with($field, $parent)) {
200199
$dependedOn[$prop] = true;
201200
break;
202201
}

0 commit comments

Comments
 (0)