From 85603785e6deb65085cddb5b40a5a13d7b66a416 Mon Sep 17 00:00:00 2001 From: Yury Bartashevich Date: Tue, 1 Jul 2025 14:52:43 +1000 Subject: [PATCH] Fix PHP8.4 deprecations --- src/Manager.php | 4 ++-- test/Serializer/DataArraySerializerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Manager.php b/src/Manager.php index 3cc4825..fe97053 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -61,7 +61,7 @@ class Manager */ private ScopeFactoryInterface $scopeFactory; - public function __construct(ScopeFactoryInterface $scopeFactory = null) + public function __construct(?ScopeFactoryInterface $scopeFactory = null) { $this->scopeFactory = $scopeFactory ?: new ScopeFactory(); } @@ -72,7 +72,7 @@ public function __construct(ScopeFactoryInterface $scopeFactory = null) public function createData( ResourceInterface $resource, ?string $scopeIdentifier = null, - Scope $parentScopeInstance = null + ?Scope $parentScopeInstance = null ): Scope { if ($parentScopeInstance !== null) { return $this->scopeFactory->createChildScopeFor($this, $parentScopeInstance, $resource, $scopeIdentifier); diff --git a/test/Serializer/DataArraySerializerTest.php b/test/Serializer/DataArraySerializerTest.php index a95720b..d93b8d5 100644 --- a/test/Serializer/DataArraySerializerTest.php +++ b/test/Serializer/DataArraySerializerTest.php @@ -1,4 +1,4 @@ -