Skip to content

Properly render 2+ namespaces functions in build/gen_stub.php #6664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

TysonAndre
Copy link
Contributor

Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE

@nikic FYI - This seems to work for a name such as PHP\iterable\any and a class. Previously, INIT_NS_CLASS_ENTRY(ce, "Foo\Bar", "X", class_Foo_Bar_X_methods); would be generated instead of "Foo\\Bar"

Should this be backported to PHP-8.0 for global functions?

@nikic
Copy link
Member

nikic commented Feb 3, 2021

Can you please adjust the zend_test stub to check this?

Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE

Add test cases of the global function and namespaced values
@TysonAndre TysonAndre force-pushed the fix-namespace-build-stub branch from 9044a89 to bab36ad Compare February 6, 2021 15:21
@TysonAndre
Copy link
Contributor Author

Should this be backported to the first version introducing gen_stubs.php (PHP-8.0) for global functions? I assume it should be for a bug fix.

@nikic
Copy link
Member

nikic commented Feb 6, 2021

@TysonAndre Yes, applying this to PHP-8.0 is fine.

@php-pulls php-pulls closed this in b4c6d5f Feb 6, 2021
php-pulls pushed a commit that referenced this pull request Feb 6, 2021
Affects ZEND_NS_FE

Add test cases of the global function

Backported to php 8.0 from GH-6664
@TysonAndre TysonAndre deleted the fix-namespace-build-stub branch February 6, 2021 19:18
@morrisonlevi
Copy link
Contributor

Thanks for fixing this; needed it just today and was happy to find it was already fixed.

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.

3 participants