Skip to content

Commit bacbd5b

Browse files
committed
Make bson-enum_error-003 resilient to PHP 8.6 interface handler order
PHP is calling the interface_gets_implemented handlers in a different order
1 parent 383bfbf commit bacbd5b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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)