Skip to content

Commit cf2c767

Browse files
committed
chore: update to PHP 8.4
- Update Dockerfile to use PHP 8.4 images - Update devbox to PHP 8.4 - Update composer.json PHP requirement to ^8.4 - Add gutenberg PHP 8.4 patch for nullable types - Fix implicit nullable parameters in custom code
1 parent 39c292f commit cf2c767

File tree

10 files changed

+55
-54
lines changed

10 files changed

+55
-54
lines changed

.lagoon/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# BUILDER IMAGE
33
# ====================================================================================================
44
FROM uselagoon/node-20-builder AS node
5-
FROM uselagoon/php-8.3-cli-drupal AS builder
5+
FROM uselagoon/php-8.4-cli-drupal AS builder
66

77
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
88
COPY --from=node /usr/local/bin/node /usr/local/bin/node
@@ -62,7 +62,7 @@ RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/preview"
6262
# ====================================================================================================
6363
# CLI IMAGE
6464
# ====================================================================================================
65-
FROM uselagoon/php-8.3-cli-drupal AS cli
65+
FROM uselagoon/php-8.4-cli-drupal AS cli
6666

6767
RUN apk add --no-cache git qpdf imagemagick icu-dev && \
6868
docker-php-ext-install intl && \
@@ -78,7 +78,7 @@ ENV PHP_MEMORY_LIMIT=2048M
7878
# ====================================================================================================
7979
# PHP IMAGE
8080
# ====================================================================================================
81-
FROM uselagoon/php-8.3-fpm AS php
81+
FROM uselagoon/php-8.4-fpm AS php
8282
RUN apk add --no-cache imagemagick qpdf icu-dev && \
8383
docker-php-ext-install intl && \
8484
docker-php-ext-enable intl

apps/cms/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
],
3333
"require": {
34-
"php": "^8.3 <8.4",
34+
"php": "^8.4",
3535
"amazeeio/drupal_integrations": "^0.3.7",
3636
"amazeelabs/default-content": "^1.2.11",
3737
"amazeelabs/silverback-cli": "^2.9.13",
@@ -116,7 +116,8 @@
116116
},
117117
"drupal/gutenberg": {
118118
"Gutenberg enabled hook": "https://www.drupal.org/files/issues/2024-05-07/gutenberg_enabled_hook_3445677-2.patch",
119-
"Remove !important from sidebar": "./patches/gutenberg_remove-important-sidebar.patch"
119+
"Remove !important from sidebar": "./patches/gutenberg_remove-important-sidebar.patch",
120+
"#3536161 - PHP 8.4 nullable types": "https://www.drupal.org/files/issues/2026-01-20/3536161-10--for-v2.patch"
120121
},
121122
"drupal/graphql": {
122123
"Check if translation exists when loading an entity by its uuid": "./patches/graphql_load_by_uuid_translation_check.patch"

devbox.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
},
1010
"packages": [
1111
"nodejs@20",
12-
"php@8.3",
13-
"php83Packages.composer@2",
14-
"php83Extensions.xdebug@3",
12+
"php@8.4",
13+
"php84Packages.composer@2",
14+
"php84Extensions.xdebug@3",
1515
"mailpit@latest",
1616
"patch@2.8"
1717
],

devbox.lock

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -142,148 +142,148 @@
142142
}
143143
}
144144
},
145-
"php83Extensions.xdebug@3": {
146-
"last_modified": "2025-03-16T16:17:41Z",
147-
"resolved": "github:NixOS/nixpkgs/8f76cf16b17c51ae0cc8e55488069593f6dab645#php83Extensions.xdebug",
145+
"php84Extensions.xdebug@3": {
146+
"last_modified": "2025-12-31T03:27:36Z",
147+
"resolved": "github:NixOS/nixpkgs/f665af0cdb70ed27e1bd8f9fdfecaf451260fc55#php84Extensions.xdebug",
148148
"source": "devbox-search",
149-
"version": "3.4.2",
149+
"version": "3.5.0",
150150
"systems": {
151151
"aarch64-darwin": {
152152
"outputs": [
153153
{
154154
"name": "out",
155-
"path": "/nix/store/9v84q3gs0dnz75gjngq5d7rnrycxwaga-php-xdebug-3.4.2",
155+
"path": "/nix/store/b3gr4bm87vj8wrnqmfn5wr8c7wpajshj-php-xdebug-3.5.0",
156156
"default": true
157157
}
158158
],
159-
"store_path": "/nix/store/9v84q3gs0dnz75gjngq5d7rnrycxwaga-php-xdebug-3.4.2"
159+
"store_path": "/nix/store/b3gr4bm87vj8wrnqmfn5wr8c7wpajshj-php-xdebug-3.5.0"
160160
},
161161
"aarch64-linux": {
162162
"outputs": [
163163
{
164164
"name": "out",
165-
"path": "/nix/store/07pj4zj0f6h8aysb266pj67gdvnhi35c-php-xdebug-3.4.2",
165+
"path": "/nix/store/5qsmfx6sylz46qrk79l2s2vnsj0a7wqf-php-xdebug-3.5.0",
166166
"default": true
167167
}
168168
],
169-
"store_path": "/nix/store/07pj4zj0f6h8aysb266pj67gdvnhi35c-php-xdebug-3.4.2"
169+
"store_path": "/nix/store/5qsmfx6sylz46qrk79l2s2vnsj0a7wqf-php-xdebug-3.5.0"
170170
},
171171
"x86_64-darwin": {
172172
"outputs": [
173173
{
174174
"name": "out",
175-
"path": "/nix/store/3rs1vd39a2wikdxb481qr7vlmk1nnizc-php-xdebug-3.4.2",
175+
"path": "/nix/store/qhn1ii0vinfzcmq664hyxim3qj5a09yr-php-xdebug-3.5.0",
176176
"default": true
177177
}
178178
],
179-
"store_path": "/nix/store/3rs1vd39a2wikdxb481qr7vlmk1nnizc-php-xdebug-3.4.2"
179+
"store_path": "/nix/store/qhn1ii0vinfzcmq664hyxim3qj5a09yr-php-xdebug-3.5.0"
180180
},
181181
"x86_64-linux": {
182182
"outputs": [
183183
{
184184
"name": "out",
185-
"path": "/nix/store/fw4sdinrc890g5hbyqdb91fqfjvymj1a-php-xdebug-3.4.2",
185+
"path": "/nix/store/slz8dxc5bbxw0r9i1bam4ziiqx78p30y-php-xdebug-3.5.0",
186186
"default": true
187187
}
188188
],
189-
"store_path": "/nix/store/fw4sdinrc890g5hbyqdb91fqfjvymj1a-php-xdebug-3.4.2"
189+
"store_path": "/nix/store/slz8dxc5bbxw0r9i1bam4ziiqx78p30y-php-xdebug-3.5.0"
190190
}
191191
}
192192
},
193-
"php83Packages.composer@2": {
194-
"last_modified": "2025-03-25T17:32:05Z",
195-
"resolved": "github:NixOS/nixpkgs/25d1b84f5c90632a623c48d83a2faf156451e6b1#php83Packages.composer",
193+
"php84Packages.composer@2": {
194+
"last_modified": "2025-12-31T03:27:36Z",
195+
"resolved": "github:NixOS/nixpkgs/f665af0cdb70ed27e1bd8f9fdfecaf451260fc55#php84Packages.composer",
196196
"source": "devbox-search",
197-
"version": "2.8.5",
197+
"version": "2.9.2",
198198
"systems": {
199199
"aarch64-darwin": {
200200
"outputs": [
201201
{
202202
"name": "out",
203-
"path": "/nix/store/w14bxfa536bda6yi3bv99r6jkdp7s8kl-composer-2.8.5",
203+
"path": "/nix/store/kkcmf0vbmcqkxj0f1b146wpbmff9xlac-composer-2.9.2",
204204
"default": true
205205
}
206206
],
207-
"store_path": "/nix/store/w14bxfa536bda6yi3bv99r6jkdp7s8kl-composer-2.8.5"
207+
"store_path": "/nix/store/kkcmf0vbmcqkxj0f1b146wpbmff9xlac-composer-2.9.2"
208208
},
209209
"aarch64-linux": {
210210
"outputs": [
211211
{
212212
"name": "out",
213-
"path": "/nix/store/qshwv909zy8hq8aj5jzyk58b7inw5wd4-composer-2.8.5",
213+
"path": "/nix/store/84hmfkm98845s0ysvy1jpz3c8rc4zhis-composer-2.9.2",
214214
"default": true
215215
}
216216
],
217-
"store_path": "/nix/store/qshwv909zy8hq8aj5jzyk58b7inw5wd4-composer-2.8.5"
217+
"store_path": "/nix/store/84hmfkm98845s0ysvy1jpz3c8rc4zhis-composer-2.9.2"
218218
},
219219
"x86_64-darwin": {
220220
"outputs": [
221221
{
222222
"name": "out",
223-
"path": "/nix/store/63rm11w42ws5cgxwdpmgs80ihkby9x6c-composer-2.8.5",
223+
"path": "/nix/store/9h88wm4y2zgyf369k0sril979x4a7iy7-composer-2.9.2",
224224
"default": true
225225
}
226226
],
227-
"store_path": "/nix/store/63rm11w42ws5cgxwdpmgs80ihkby9x6c-composer-2.8.5"
227+
"store_path": "/nix/store/9h88wm4y2zgyf369k0sril979x4a7iy7-composer-2.9.2"
228228
},
229229
"x86_64-linux": {
230230
"outputs": [
231231
{
232232
"name": "out",
233-
"path": "/nix/store/ydjcz05ggcxf12n0vzsr7sqhrix4i28m-composer-2.8.5",
233+
"path": "/nix/store/glpcv2mp0jl7xaji7ns5w6kfryja64kc-composer-2.9.2",
234234
"default": true
235235
}
236236
],
237-
"store_path": "/nix/store/ydjcz05ggcxf12n0vzsr7sqhrix4i28m-composer-2.8.5"
237+
"store_path": "/nix/store/glpcv2mp0jl7xaji7ns5w6kfryja64kc-composer-2.9.2"
238238
}
239239
}
240240
},
241-
"php@8.3": {
242-
"last_modified": "2024-10-22T11:15:56Z",
241+
"php@8.4": {
242+
"last_modified": "2025-12-31T03:27:36Z",
243243
"plugin_version": "0.0.3",
244-
"resolved": "github:NixOS/nixpkgs/782740762fb281404740b6b7084d356c3dab1173#php83",
244+
"resolved": "github:NixOS/nixpkgs/f665af0cdb70ed27e1bd8f9fdfecaf451260fc55#php",
245245
"source": "devbox-search",
246-
"version": "8.3.12",
246+
"version": "8.4.16",
247247
"systems": {
248248
"aarch64-darwin": {
249249
"outputs": [
250250
{
251251
"name": "out",
252-
"path": "/nix/store/lwjmrn7p8vddi417yg1mc38r7447z3f9-php-with-extensions-8.3.12",
252+
"path": "/nix/store/vcc1qgjma41h0gxsjjajiz1zgk3x7azf-php-with-extensions-8.4.16",
253253
"default": true
254254
}
255255
],
256-
"store_path": "/nix/store/lwjmrn7p8vddi417yg1mc38r7447z3f9-php-with-extensions-8.3.12"
256+
"store_path": "/nix/store/vcc1qgjma41h0gxsjjajiz1zgk3x7azf-php-with-extensions-8.4.16"
257257
},
258258
"aarch64-linux": {
259259
"outputs": [
260260
{
261261
"name": "out",
262-
"path": "/nix/store/syspmljfrrj4kn8haxm47c219cipmks8-php-with-extensions-8.3.12",
262+
"path": "/nix/store/3bv66a3i6ccpmcxvs5in0vxkwfsj5nlr-php-with-extensions-8.4.16",
263263
"default": true
264264
}
265265
],
266-
"store_path": "/nix/store/syspmljfrrj4kn8haxm47c219cipmks8-php-with-extensions-8.3.12"
266+
"store_path": "/nix/store/3bv66a3i6ccpmcxvs5in0vxkwfsj5nlr-php-with-extensions-8.4.16"
267267
},
268268
"x86_64-darwin": {
269269
"outputs": [
270270
{
271271
"name": "out",
272-
"path": "/nix/store/0h0nlhrdf51dbrlgjdhgsaaaxkqbdsw5-php-with-extensions-8.3.12",
272+
"path": "/nix/store/f8p067vigk85q5hfxwzq4nymzdvjljy0-php-with-extensions-8.4.16",
273273
"default": true
274274
}
275275
],
276-
"store_path": "/nix/store/0h0nlhrdf51dbrlgjdhgsaaaxkqbdsw5-php-with-extensions-8.3.12"
276+
"store_path": "/nix/store/f8p067vigk85q5hfxwzq4nymzdvjljy0-php-with-extensions-8.4.16"
277277
},
278278
"x86_64-linux": {
279279
"outputs": [
280280
{
281281
"name": "out",
282-
"path": "/nix/store/w1mb240vw5p9hkkflfw34c28d0ppkiiw-php-with-extensions-8.3.12",
282+
"path": "/nix/store/zc1v3c5sqbm9kazc0h9rzp17w4ihw2ih-php-with-extensions-8.4.16",
283283
"default": true
284284
}
285285
],
286-
"store_path": "/nix/store/w1mb240vw5p9hkkflfw34c28d0ppkiiw-php-with-extensions-8.3.12"
286+
"store_path": "/nix/store/zc1v3c5sqbm9kazc0h9rzp17w4ihw2ih-php-with-extensions-8.4.16"
287287
}
288288
}
289289
}

packages/@amazeelabs/silverback-gatsby/drupal/silverback_gatsby/src/Plugin/GraphQL/DataProducer/ImageProps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function __construct(
9797
*
9898
* @return array|null
9999
*/
100-
public function resolve(FileInterface $entity = NULL, RefinableCacheableDependencyInterface $metadata) {
100+
public function resolve(?FileInterface $entity = NULL, RefinableCacheableDependencyInterface $metadata) {
101101
// Return if we dont have an entity.
102102
if (!$entity) {
103103
return NULL;

packages/@amazeelabs/silverback-gatsby/drupal/silverback_gatsby/tests/src/Kernel/MenuFeedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function setUp(): void {
6060
$this->container->get('silverback_gatsby.update_handler')->schemaCache = NULL;
6161
}
6262

63-
protected function createMenuItem(string $label, string $url, MenuLinkContentInterface $parent = null, $menu = 'main'): MenuLinkContentInterface {
63+
protected function createMenuItem(string $label, string $url, ?MenuLinkContentInterface $parent = null, $menu = 'main'): MenuLinkContentInterface {
6464
$item = MenuLinkContent::create([
6565
'provider' => 'silverback_gatsby',
6666
'menu_name' => $menu,

packages/@amazeelabs/silverback-gutenberg/drupal/silverback_gutenberg/src/BlockSerializer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function serialize_block( $block ) {
3535
);
3636
}
3737

38-
protected function get_comment_delimited_block_content($block_name = null, $block_attributes = null, $block_content = '') {
38+
protected function get_comment_delimited_block_content(?string $block_name = null, ?array $block_attributes = null, string $block_content = '') {
3939
if ( is_null( $block_name ) ) {
4040
return $block_content;
4141
}
@@ -60,7 +60,7 @@ protected function get_comment_delimited_block_content($block_name = null, $bloc
6060
);
6161
}
6262

63-
protected function strip_core_block_namespace( $block_name = null ) {
63+
protected function strip_core_block_namespace( ?string $block_name = null ) {
6464
if ( is_string( $block_name ) && 0 === strpos( $block_name, 'core/' ) ) {
6565
return substr( $block_name, 5 );
6666
}

packages/@amazeelabs/silverback-gutenberg/drupal/silverback_gutenberg/src/LinkProcessor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function addCacheableDependency($other_object) {
7171
$this->cacheableMetadata->addCacheableDependency($other_object);
7272
}
7373

74-
public function processLinks(string $html, string $direction, LanguageInterface $language = NULL) {
74+
public function processLinks(string $html, string $direction, ?LanguageInterface $language = NULL) {
7575
if (!in_array($direction, ['inbound', 'outbound'], TRUE)) {
7676
throw new \Exception('Unknown direction: "' . $direction . '".');
7777
}
@@ -99,7 +99,7 @@ public function processLinks(string $html, string $direction, LanguageInterface
9999
return $processed;
100100
}
101101

102-
protected function processBlocks(&$blocks, string $direction, LanguageInterface $language = NULL): void {
102+
protected function processBlocks(&$blocks, string $direction, ?LanguageInterface $language = NULL): void {
103103
$processUrlCallback = fn(string $url) => $this->processUrl($url, $direction, $language);
104104
$processLinksCallback = fn(string $html) => $this->processLinks($html, $direction, $language);
105105
foreach ($blocks as &$block) {
@@ -203,7 +203,7 @@ protected function cleanUrl(string $url): string {
203203
return $this->buildUrl($parts);
204204
}
205205

206-
protected function processLink(\DOMElement $link, string $direction, LanguageInterface $language = NULL) {
206+
protected function processLink(\DOMElement $link, string $direction, ?LanguageInterface $language = NULL) {
207207
if ($direction === 'outbound' && !$language) {
208208
throw new \Exception('$language is required for "outbound" direction.');
209209
}
@@ -229,7 +229,7 @@ protected function processLink(\DOMElement $link, string $direction, LanguageInt
229229

230230
}
231231

232-
public function processUrl(string $url, string $direction, LanguageInterface $language = NULL, array &$metadata = NULL): string {
232+
public function processUrl(string $url, string $direction, ?LanguageInterface $language = NULL, ?array &$metadata = NULL): string {
233233
$metadata = [];
234234

235235
if ($direction === 'outbound' && !$language) {

packages/@amazeelabs/silverback-gutenberg/drupal/silverback_gutenberg/src/Service/MediaService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class MediaService extends Original {
99

10-
public function renderDialog(array $media_types, array $media_bundles = NULL) {
10+
public function renderDialog(array $media_types, ?array $media_bundles = NULL) {
1111
// Instead of guessing media types as the parent method does, use given
1212
// media types as media type IDs. So the blocks have full control over
1313
// allowed media types.

packages/drupal/custom/src/Plugin/views/field/UsageCount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function render(ResultRow $values): string|MarkupInterface {
128128
* to correctly build a link. Will return FALSE if this item should not be
129129
* shown on the UI (for example when dealing with an orphan paragraph).
130130
*/
131-
protected function getSourceEntityLink(EntityInterface $source_entity, $text = NULL) {
131+
protected function getSourceEntityLink(EntityInterface $source_entity, ?string $text = NULL) {
132132
// Note that $paragraph_entity->label() will return a string of type:
133133
// "{parent label} > {parent field}", which is actually OK for us.
134134
$entity_label = $source_entity->access('view label') ? $source_entity->label() : $this->t('- Restricted access -');

0 commit comments

Comments
 (0)