Skip to content

Proxy generation fails if magic methods are marked as final. #187

Description

@jmalloc

The PDO::__wakeup() method is marked as final, but it looks like the final flag of magic methods is not checked as it is for other methods. Hence the code below produces a fatal error:

$factory = new ProxyManager\Factory\LazyLoadingValueHolderFactory();
$factory->createProxy(
    'PDO',
    function () {}
);
Fatal error: Cannot override final method PDO::__wakeup() in ... on line 5

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions