imposter icon indicating copy to clipboard operation
imposter copied to clipboard

Feature Request: support class_alias

Open eteubert opened this issue 4 years ago • 1 comments

Currently class_alias is not supported.

I need this because I would like to use imposter for Twig, but they make use of class_alias, for example here: https://github.com/twigphp/Twig/blob/2.x/src/Environment.php#L995

I think the prefix should be applied to both the alias $origin and $alias.

# from the PHP docs:
class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) : bool

eteubert avatar Oct 29 '20 08:10 eteubert

Just want to let you know that I moved to PHP Scoper.

I tried looking at your code but couldn't wrap my head around the regexes 😅 And even support for class_alias wouldn't be enough to scope Twig. I need the flexibility of what PHP Scoper calls "patcher" to make it work -- unfortunately.

Still want to leave a thumbs up 👍 here for your efforts. Especially with your imposter-plugin the usage is really pleasant. I'm just unfortunate, I guess, in that the only dependency I need to wrap makes scoping really hard. Feel free to close the issue.

eteubert avatar Nov 02 '20 08:11 eteubert