-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Scoper] Whitelist @internal
symbols
#347
Comments
I'll have to add a similar autoloading mechanism as https://github.com/theseer/Autoload to HumbugBox then, as this feature would otherwise completely break the regular autoloading. |
I am not 100% sure how this should be handled. I think the best way would, when dealing with a class, interface or trait declaration, check its comment and register it to the whitelist if has |
@internal
symbols
Revisiting the issue, I do not think this is worth pursuing anymore. The problem I can see with this approach, is that by default, symbols are not exposed. So making Whilst the above can make sense in some situations, I see how it could 1. be a surprising behaviour and and 2. not be desired in some situations. That being said, the configuration changed a lot since the issue was posted. There is now several exclude/expose strategies via either names and/or regexes. Alternative an approach akin to the one done for Wordpress plugins can be adopted which is to have a tool checking the codebase and collecting the internal symbols, and then pass this result to PHP-Scoper (whether those symbols are collected before-hand or when loading the config is at the discretion of the user). If it proves useful, this could be made into either a class exposed to the config, or via a command which could dump the result into a file and load this in the |
See sebastianbergmann/phpunit#3750.
The text was updated successfully, but these errors were encountered: