Skip to content

Guard enum case instance method dispatch (#10341) - #10587

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-10341-enum-instance-method
Jun 22, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-10341-enum-instance-method

Conversation

@PurHur

@PurHur PurHur commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/maintainer_gap_enum_instance_method.php
php bin/vm.php test/repro/maintainer_gap_enum_instance_method.php
php test/repro/maintainer_gap_enum_case_method_dispatch.php
php bin/vm.php test/repro/maintainer_gap_enum_case_method_dispatch.php
php bin/vm.php test/compliance/cases/language/enum_user_method.phpt
cd /compiler && vendor/bin/phpunit --filter EnumInstanceMethodGapTest
'

Output:

A
A
x
ok
x
ok
Ok
Err
PHPUnit 9.6.21 ... OK (3 tests, 5 assertions)

Test plan

  • Issue repro scripts match Zend on VM
  • enum_user_method.phpt green
  • EnumInstanceMethodGapTest (3 tests) green

Made with Cursor

Add PHPUnit coverage for interface method dispatch on enum cases so the
re-#3390 "Method call on non-object" failure cannot return unnoticed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 5cea0a0 into master Jun 22, 2026
@PurHur
PurHur deleted the agent/issue-10341-enum-instance-method branch June 22, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: enum case instance method call — re-#3390, Method call on non-object (Zend/zend_enum.c)

1 participant