Skip to content

[Feature] Interception of final methods #372

Description

@lisachenko

Currently, framework doesn't support interception of final methods, but after switching to the AST-base transformers, it can be easily solved by asking offsets for the methods.

Idea of intercepting final methods is following.
We take original class Foo and make it's intercepted final method bar non-final. Then create child with this method and make it final to preserve final logic.

final class Foo{
    final public function bar() {}
}

Will be converted to the:

class Foo__AopProxied{
    public function bar() {}
}

final class Foo extends Foo__AopProxied {
    final public function bar() {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions