Skip to content

Commit f86cb0a

Browse files
authored
[GHA][CI] Fixed integration tests callable to use the same PHP version (#182)
For more details see #182 Key changes: * [GHA][CI] Fixed integration tests callable to use the same PHP version * [GHA][CI] Bumped Ubuntu & 3rd party GHA actions versions * [PHPStan] Fixed handling XML node attributes when converting DOM
1 parent ad1492d commit f86cb0a

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
jobs:
1111
cs-fix:
1212
name: Run code style check
13-
runs-on: "ubuntu-22.04"
13+
runs-on: "ubuntu-24.04"
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- name: Setup PHP Action
1818
uses: shivammathur/setup-php@v2
@@ -22,7 +22,7 @@ jobs:
2222
extensions: 'pdo_sqlite, gd'
2323
tools: cs2pr
2424

25-
- uses: ramsey/composer-install@v2
25+
- uses: ramsey/composer-install@v3
2626
with:
2727
dependency-versions: highest
2828

@@ -31,7 +31,7 @@ jobs:
3131

3232
tests:
3333
name: Unit & integration tests
34-
runs-on: "ubuntu-22.04"
34+
runs-on: "ubuntu-24.04"
3535
timeout-minutes: 15
3636

3737
strategy:
@@ -43,7 +43,7 @@ jobs:
4343
- '8.2'
4444

4545
steps:
46-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4747

4848
- name: Setup PHP Action
4949
uses: shivammathur/setup-php@v2
@@ -53,7 +53,7 @@ jobs:
5353
extensions: pdo_sqlite, gd
5454
tools: cs2pr
5555

56-
- uses: ramsey/composer-install@v2
56+
- uses: ramsey/composer-install@v3
5757
with:
5858
dependency-versions: highest
5959

.github/workflows/integration-tests-callable.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 15
1717

18+
strategy:
19+
matrix:
20+
php:
21+
- '7.4'
22+
1823
steps:
19-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2025

2126
- name: Set project version
2227
run: |
@@ -26,7 +31,7 @@ jobs:
2631
- name: Setup PHP Action
2732
uses: shivammathur/setup-php@v2
2833
with:
29-
php-version: 7.4
34+
php-version: ${{ matrix.php }}
3035
coverage: none
3136

3237
- name: Cache dependencies
@@ -41,7 +46,7 @@ jobs:
4146
run: |
4247
curl -L "https://raw.githubusercontent.com/ibexa/ci-scripts/main/bin/${{ env.version }}/prepare_project_edition.sh" > prepare_project_edition.sh
4348
chmod +x prepare_project_edition.sh
44-
./prepare_project_edition.sh ${{ env.PROJECT_EDITION }} ${{ env.version }} ${{ env.SETUP }}
49+
./prepare_project_edition.sh ${{ env.PROJECT_EDITION }} ${{ env.version }} ${{ env.SETUP }} "ghcr.io/ibexa/docker/php:${{ matrix.php }}-node18"
4550
4651
- name: Run setup command
4752
run: |

src/lib/Input/Handler/Xml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ protected function convertDom(\DOMNode $node)
128128
$current = [];
129129
$text = '';
130130

131-
if ($node instanceof \DOMElement) {
131+
if ($node instanceof \DOMElement && $node->attributes !== null) {
132132
foreach ($node->attributes as $name => $attribute) {
133133
$current["_{$name}"] = $attribute->value;
134134
}

0 commit comments

Comments
 (0)