[php-src] master: Merge branch 'PHP-8.6'

From: Date: Thu, 05 Nov 2026 00:14:50 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143342@lists.php.net to get a copy of this message
Author: Jorg Sowa (jorgsowa) Date: 2026-11-05T00:58:17+01:00 Commit: https://github.com/php/php-src/commit/d765ae315abaa430065797d5a3c974d4e29cad06 Raw diff: https://github.com/php/php-src/commit/d765ae315abaa430065797d5a3c974d4e29cad06.diff Merge branch 'PHP-8.6' # Conflicts: # NEWS Changed paths: A Zend/tests/assert/expect_qualified_name_lists.phpt M Zend/zend_ast.c Diff: diff --git a/Zend/tests/assert/expect_qualified_name_lists.phpt b/Zend/tests/assert/expect_qualified_name_lists.phpt new file mode 100644 index 000000000000..24c54b7bee08 --- /dev/null +++ b/Zend/tests/assert/expect_qualified_name_lists.phpt @@ -0,0 +1,37 @@ +--TEST-- +AST printing of fully qualified and namespace-relative names in name lists +--INI-- +zend.assertions=1 +--FILE-- +<?php + +try { + assert(false && function () { + class C implements \A, namespace\B, C { + use \T1, namespace\T2, T3 { + \T1::foo insteadof namespace\T2, T3; + namespace\T2::foo as bar; + } + } + try { + } catch (\E1 | namespace\E2 | E3 $e) { + } + }); +} catch (AssertionError $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECT-- +assert(false && function () { + class C implements \A, namespace\B, C { + use \T1, namespace\T2, T3 { + \T1::foo insteadof namespace\T2, T3; + namespace\T2::foo as bar; + } + } + + try { + } catch (\E1|namespace\E2|E3 $e) { + } +}) diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 60732096dfca..b5caac7afc22 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1960,7 +1960,7 @@ static ZEND_COLD void zend_ast_export_name_list_ex(smart_str *str, const zend_as if (i != 0) { smart_str_appends(str, separator); } - zend_ast_export_name(str, list->child[i], 0, indent); + zend_ast_export_ns_name(str, list->child[i], 0, indent); i++; } } @@ -2970,7 +2970,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio break; case ZEND_AST_TRAIT_METHOD_REFERENCE: if (ast->child[0]) { - zend_ast_export_name(str, ast->child[0], 0, indent); + zend_ast_export_ns_name(str, ast->child[0], 0, indent); smart_str_appends(str, "::"); } zend_ast_export_name(str, ast->child[1], 0, indent);

« previous php.cvs (#143342) next »