Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: support class_alias #277

Open
eteubert opened this issue Oct 29, 2020 · 1 comment
Open

Feature Request: support class_alias #277

eteubert opened this issue Oct 29, 2020 · 1 comment

Comments

@eteubert
Copy link

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
Copy link
Author

eteubert commented Nov 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant