Skip to content

Close stale #10203: enum spaceship maintainer repro guard - #10207

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-10203-enum-spaceship-guard
Jun 20, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-10203-enum-spaceship-guard

Conversation

@PurHur

@PurHur PurHur commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #10203

php-src reference

  • Zend/zend_enum.c — zend_compare_enum (enum <=> is not backing-scalar order; different cases / enum-vs-non-enum return 1, identical case 0)

Verification

source script/php-env.sh

# Issue repro (Zend)
php test/repro/maintainer_spaceship_enum.php
# int(1)\nint(1)\nint(1)

# Issue repro (VM)
php bin/vm.php test/repro/maintainer_spaceship_enum.php
# int(1)\nint(1)\nint(1)

# Issue repro (JIT)
php bin/jit.php test/repro/maintainer_spaceship_enum.php
# int(1)\nint(1)\nint(1)

# New guard + compliance
php vendor/bin/phpunit test/unit/EnumSpaceshipMaintainerReproTest.php
# OK (2 tests, 6 assertions)

php bin/vm.php test/compliance/cases/language/enum_spaceship.phpt
# int(1) … int(1) (7 lines, matches --EXPECT--)

Lane A audit note

Other lane-A language queue items checked this run (#9621 instanceof/is_a, #10029 static enum property default, #9684/9951/10062/10131) — all green on current master; recommend closing those stale filings separately.

Made with Cursor

Regression was already fixed on master; wire VM/JIT maintainer repro into PHPUnit so stale #10203 filing stays closed.

Co-authored-by: Cursor <cursoragent@cursor.com>
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: spaceship (<=>) on backed enum cases — VM still inverts Zend signs (re-#9796, Zend/zend_enum.c)

1 participant