Repository navigation
Fix BackedEnum from()/spaceship var_dump dead call-arg slot (#9575) - #9598
Merged
Merged
Conversation
Extend the #9030 inline producer wiring to TYPE_LONG so var_dump(E::A <=> E::from(1)) sends the spaceship int result instead of a stale enum-case temp, restoring enum_from compliance and maintainer repro parity. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
findInlineExprCallArgProducerSlot()toTYPE_LONG(spaceship<=>results), sovar_dump(E::A <=> E::from(1))passes the comparison int instead of a stale enum-case slot.test/repro/maintainer_enum_from_regression.phpand a compile-time guard inInlineCallArgProducerSlotTest.Root cause:
BackedEnum::from()/tryFrom()lookup was already correct on VM/JIT; the reported regression surfaced viaenum_from_spaceship.phptwhere php-cfg emits a dead arg temp forvar_dump()and the compiler only rewired boolean producers (#9030), not int-producing spaceship ops nested withE::from().php-src reference:
Zend/zend_enum.c—zend_enum_from_case(); compile-time call-arg lowering mirrorszend_compile.cdead-temp behavior (#9030).Test plan
Verified output (2026-06-18)
Closes #9575
Made with Cursor