🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Support Closure::bindTo() #8569

Description

@yurybykov

Feature request

In some cases, I need to call private method of object (in my case it's happening in closure like friendly function in C++).

Code snippet that reproduces the problem

https://phpstan.org/r/75c0ce71-73d3-44f8-94a8-35ab1e083ff9 (sorry for long example, but it cannot be shown shorter)

Little description: It has Parameter that use Type. Link consist of two Parameters. In some cases, it needs to change type for two Parameters simultaneously without Link recreation, but it cannot be done due to Parameter validation (canChangeType method).

Call doChangeType method, catch error "Call to private method doChangeType of class Parameter.".

Propose

I propose to add scope PHPDoc tag that show current scope, because Phpstan don't consider bindTo second argument. Example in closure of __invoke method of ParameterTypeChangeMacroService.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions