Skip to content

Language: class_alias allows internal class originals like Zend (#29084) - #29106

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

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

Conversation

@PurHur

@PurHur PurHur commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/issue_29084_class_alias_internal.php'
  • same with bin/jit.php
  • vendor/bin/phpunit test/unit/ClassAliasInternal29084Test.php → OK (2 tests)
  • PHPT bodies for class_alias_internal, class_alias_internal_duplicate, warnings, enum TypeError via bin/vm.php
  • Note: full VMTest data-provider is currently broken on master by unrelated --EXTENSIONS-- PHPTs (method_property_exists_string_autoload_jit, is_a_subclass_string_autoload_jit); compliance .phpt files updated for when that clears.

php-src

  • Zend/zend_builtin_functions.cPHP_FUNCTION(class_alias)

Gate snapshot (pre-claim)

  • bootstrap-selfhost-link: partial — stale gen-0 drivers, fell back to Zend gen-0 compile of compiler_minimal (long-running; stopped after recording symptom).
  • Inventory --check exit 0.

Made with Cursor

Remove the over-broad ValueError from #18300 so aliasing stdClass/Exception
matches php-src; duplicate names still warn and return false.

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: class_alias() rejects internal classes with ValueError — Zend allows stdClass/Exception aliases (re-#18290, Zend/zend_builtin_functions.c)

1 participant