From c7521c33add45f8bce074ed4d21b98138df8e368 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Thu, 8 May 2025 14:39:12 +1000
Subject: [PATCH] Issue #3521612 by nicxvan, dww, donquixote: Use ? type
 shortcut instead of |null for order param on Hook attribute

---
 core/lib/Drupal/Core/Hook/Attribute/Hook.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/lib/Drupal/Core/Hook/Attribute/Hook.php b/core/lib/Drupal/Core/Hook/Attribute/Hook.php
index c404a4a028ba..34dbc8ebf916 100644
--- a/core/lib/Drupal/Core/Hook/Attribute/Hook.php
+++ b/core/lib/Drupal/Core/Hook/Attribute/Hook.php
@@ -135,7 +135,7 @@ public function __construct(
     public string $hook = '',
     public string $method = '',
     public ?string $module = NULL,
-    public OrderInterface|null $order = NULL,
+    public ?OrderInterface $order = NULL,
   ) {
     $this->hook = implode('_', array_filter([static::PREFIX, $hook, static::SUFFIX]));
     if ($this->hook === '') {
-- 
GitLab