Skip to content

Commit 1cdd470

Browse files
authored
upgrade Engine block to php 8.5 (#1962)
* Upgrade to PHP 8.5 and Node 24 - Rename Dockerfile-php82 → Dockerfile-php85, use php85-apache2-node24 base image - Rename docker-compose-php82.yml → docker-compose-php85.yml - Update Dockerfile.prod to php85-apache2 - Update docker-compose-tag-release.yml to php85-apache2-node24 - Bump composer.json PHP constraint to ^8.5, run composer update - Run yarn upgrade for Node 24 compatibility - Update GitHub Actions matrix and PROD_PHP to php85 Fixes #1847 * Fix PHP 8.5 implicit nullable parameter deprecations Apply ExplicitNullableParamTypeRector across src/, library/ and tests/ to replace implicit nullable params (Foo $x = null) with explicit nullable types (?Foo $x = null), fixing the PHP 8.5 deprecation that was crashing the PHPUnit bootstrap. 794 PHPUnit tests passing on PHP 8.5 after this change. * Fix remaining PHP 8.5 deprecations breaking Behat in CI - Bindings.php: replace null array key with empty string - NameIdResolver.php: cast spId/idpId to string before session access - XmlToArray.php: remove xml_parser_free() deprecated since PHP 8.5 All 277 Behat scenarios now pass. * Patch fix
1 parent 432b332 commit 1cdd470

66 files changed

Lines changed: 641 additions & 545 deletions

File tree

Some content is hidden

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

.github/workflows/run-cypress.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
timeout-minutes: 30
1717
strategy:
1818
matrix:
19-
php: [ php82 ]
19+
php: [ php85 ]
2020
env:
21-
PROD_PHP: php82
21+
PROD_PHP: php85
2222
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-${{matrix.php}}.yml
2323
steps:
2424
- name: Checkout

.github/workflows/test-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
timeout-minutes: 30
1616
strategy:
1717
matrix:
18-
php: [ php82 ]
18+
php: [ php85 ]
1919
env:
20-
PROD_PHP: php82
20+
PROD_PHP: php85
2121
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-${{matrix.php}}.yml
2222
steps:
2323
- name: Checkout

composer.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"source": "https://github.com/OpenConext/OpenConext-engineblock"
1717
},
1818
"require": {
19-
"php": "^8.2",
19+
"php": "^8.5",
2020
"ext-dom": "*",
2121
"ext-json": "*",
2222
"ext-mbstring": "*",
@@ -58,6 +58,7 @@
5858
"behat/behat": "^3.26",
5959
"behat/mink": "^1.12",
6060
"behat/mink-browserkit-driver": "^2.2",
61+
"cweagans/composer-patches": "^1.7",
6162
"dmore/behat-chrome-extension": "^1.4",
6263
"dmore/chrome-mink-driver": "2.9.3",
6364
"friends-of-behat/mink-extension": "^2.7.5",
@@ -129,16 +130,23 @@
129130
"config": {
130131
"optimize-autoloader": true,
131132
"platform": {
132-
"php": "8.2"
133+
"php": "8.5"
133134
},
134135
"sort-packages": true,
135136
"allow-plugins": {
137+
"cweagans/composer-patches": true,
136138
"dealerdirect/phpcodesniffer-composer-installer": true,
137139
"endroid/installer": false,
138140
"symfony/flex": true
139141
}
140142
},
141143
"extra": {
144+
"composer-exit-on-patch-failure": true,
145+
"patches": {
146+
"phrity/websocket": {
147+
"PHP 8.5: fix implicit nullable param in ConnectionException": "patches/phrity-websocket-php85-nullable.patch"
148+
}
149+
},
142150
"symfony": {
143151
"allow-contrib": false,
144152
"require": "7.4.*"

0 commit comments

Comments
 (0)