Skip to content

Commit 2614b9a

Browse files
committed
Make bson-enum_error resilient to PHP 8.6 interface handler order (mongodb#1953)
PHP is calling the interface_gets_implemented handlers in a different order
1 parent 3fe80e4 commit 2614b9a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/bson/bson-enum_error-003.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ enum MyEnum implements MongoDB\BSON\Persistable
1515
?>
1616
===DONE===
1717
<?php exit(0); ?>
18-
--EXPECTF--
19-
Fatal error: Enum class MyEnum cannot implement interface MongoDB\BSON\Persistable in %s on line %d
18+
--EXPECTREGEX--
19+
Fatal error: Enum class MyEnum cannot implement interface MongoDB\\BSON\\(Persistable|Unserializable) in .+ on line \d+

tests/bson/bson-enum_error-004.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ enum MyBackedEnum: int implements MongoDB\BSON\Persistable
1515
?>
1616
===DONE===
1717
<?php exit(0); ?>
18-
--EXPECTF--
19-
Fatal error: Enum class MyBackedEnum cannot implement interface MongoDB\BSON\Persistable in %s on line %d
18+
--EXPECTREGEX--
19+
Fatal error: Enum class MyBackedEnum cannot implement interface MongoDB\\BSON\\(Persistable|Unserializable) in .+ on line \d+

0 commit comments

Comments
 (0)