From 5726e854de57924df24dad3c0545e8bf1a067940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 8 Apr 2026 10:42:11 +0200 Subject: [PATCH] Make bson-enum_error resilient to PHP 8.6 interface handler order (#1953) (#1977) Backport of 15e343c8c7cbe13bbc49fbab2973bd752da3a905 to v2.2. PHP is calling the interface_gets_implemented handlers in a different order --- tests/bson/bson-enum_error-003.phpt | 4 ++-- tests/bson/bson-enum_error-004.phpt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bson/bson-enum_error-003.phpt b/tests/bson/bson-enum_error-003.phpt index 788868437..e78f766fa 100644 --- a/tests/bson/bson-enum_error-003.phpt +++ b/tests/bson/bson-enum_error-003.phpt @@ -15,5 +15,5 @@ enum MyEnum implements MongoDB\BSON\Persistable ?> ===DONE=== ---EXPECTF-- -Fatal error: Enum class MyEnum cannot implement interface MongoDB\BSON\Persistable in %s on line %d +--EXPECTREGEX-- +Fatal error: Enum class MyEnum cannot implement interface MongoDB\\BSON\\(Persistable|Unserializable) in .+ on line \d+ diff --git a/tests/bson/bson-enum_error-004.phpt b/tests/bson/bson-enum_error-004.phpt index 3136f0060..32a43d568 100644 --- a/tests/bson/bson-enum_error-004.phpt +++ b/tests/bson/bson-enum_error-004.phpt @@ -15,5 +15,5 @@ enum MyBackedEnum: int implements MongoDB\BSON\Persistable ?> ===DONE=== ---EXPECTF-- -Fatal error: Enum class MyBackedEnum cannot implement interface MongoDB\BSON\Persistable in %s on line %d +--EXPECTREGEX-- +Fatal error: Enum class MyBackedEnum cannot implement interface MongoDB\\BSON\\(Persistable|Unserializable) in .+ on line \d+