From cb03803c8a34b179b753e352a0a7879476295e9a Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Fri, 6 Sep 2024 03:26:23 +0200 Subject: [PATCH] fix 2 tests for PHP 8.4 (#152) - https://php.watch/rfcs/deprecate-implicitly-nullable-types - https://github.com/php/php-src/pull/13550 --- ext/tests/post_hook_returns_cloned_modified_object.phpt | 2 +- ext/tests/span_attribute/function_params_non_simple.phpt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/tests/post_hook_returns_cloned_modified_object.phpt b/ext/tests/post_hook_returns_cloned_modified_object.phpt index f5985af..9f20f28 100644 --- a/ext/tests/post_hook_returns_cloned_modified_object.phpt +++ b/ext/tests/post_hook_returns_cloned_modified_object.phpt @@ -10,7 +10,7 @@ opentelemetry class Foo { public ?string $a = null; - public function __construct(string $a = null) + public function __construct(string|null $a = null) { $this->a = $a; } diff --git a/ext/tests/span_attribute/function_params_non_simple.phpt b/ext/tests/span_attribute/function_params_non_simple.phpt index 1c09ce0..f637ab1 100644 --- a/ext/tests/span_attribute/function_params_non_simple.phpt +++ b/ext/tests/span_attribute/function_params_non_simple.phpt @@ -34,7 +34,7 @@ foo( null, ); ?> ---EXPECT-- +--EXPECTF-- string(3) "pre" array(4) { ["one"]=> @@ -46,7 +46,7 @@ array(4) { object(stdClass)#1 (0) { } ["three"]=> - object(Closure)#2 (0) { + object(Closure)#2 (%d) {%A } ["four"]=> NULL