Skip to content

Language: class_alias internal originals ValueError on PROFILE≤8.2 (#29150) - #29155

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-29150-class-alias-internal-profile
Aug 8, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-29150-class-alias-internal-profile

Conversation

@PurHur

@PurHur PurHur commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

php-src

  • Zend/zend_builtin_functions.c — PHP_FUNCTION(class_alias) (PHP-8.2 ValueError vs 8.3+ allow)

Test plan

  • Issue repro (exact):
    PHP_COMPILER_PROFILE=8.2 php bin/vm.php /tmp/class_alias_internal_82.php
    PHP_COMPILER_PROFILE=8.2 php bin/jit.php /tmp/class_alias_internal_82.php
    
    → ValueError:class_alias(): Argument #1 ($class) must be a user-defined class name, internal class name given
  • test/repro/issue_29150_class_alias_internal_profile82.php — stdClass/Exception/Traversable reject; user class true (VM+JIT PROFILE=8.2); all true on PROFILE=8.4
  • PHP_COMPILER_PROFILE=8.4 php bin/jit.php test/repro/issue_29084_class_alias_internal.php — no Regression: class_alias() rejects internal classes with ValueError — Zend allows stdClass/Exception aliases (re-#18290, Zend/zend_builtin_functions.c) #29084 regression
  • vendor/bin/phpunit --filter 'ClassAliasInternalProfile29150Test|ClassAliasInternal29084Test|testAllowsClassAliasOfInternalClass' → OK (8 tests)
  • Compliance .phpt: allow cases gated PROFILE=8.3; new class_alias_internal_reject_profile82.phpt

Gate snapshot (pre-claim)

  • docker info: ok
  • php script/bootstrap-inventory.php --check: red — stale docs/bootstrap-inventory.md DOM helper method-count drift (unrelated; not restamped)
  • release-readiness: started; not blocking this language fix

Made with Cursor

…29150)

Gate Zend 8.1/8.2 rejection behind CompilerVersion::allowsClassAliasOfInternalClass while keeping the #29084 allow path for PROFILE≥8.3.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 9722a5c into master Aug 8, 2026
@PurHur
PurHur deleted the agent/issue-29150-class-alias-internal-profile branch August 8, 2026 22:27
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: class_alias(internal) succeeds on PROFILE≤8.2 — Zend ValueError (re-#29084, Zend/zend_builtin_functions.c)

1 participant