php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80071 Expose closure uses through reflection
Submitted: 2020-09-07 07:48 UTC Modified: 2020-10-06 14:56 UTC
From: michael dot vorisek at email dot cz Assigned:
Status: Open Package: Reflection related
PHP Version: 7.4.10 OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-09-07 07:48 UTC] michael dot vorisek at email dot cz
Description:
------------
Reflection should provide full access to all all function details.

"use" variables should be accessible as well

usecase: https://github.com/atk4/core/pull/272/files#diff-08f44384ad9646881f3b84d38f3e8d92R54

like function is checked if it is bound, there should be also a check if function uses "use"

Test script:
---------------
this is currently not possible, this is a feature request

Actual result:
--------------
n/a

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-06 14:56 UTC] nikic@php.net
-Summary: Function "use" variables must be accessible thru reflection +Summary: Expose closure uses through reflection
 [2020-10-06 14:56 UTC] nikic@php.net
Uses are accessible as part of getStaticVariables(), though not distinguished from other static variables.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 27 12:01:22 2020 UTC