-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
How exactly whitelist works for subnamespaces? #366
Comments
I tried this with same effect: 'whitelist' => [
'Symplify\EasyCodingStandard\*',
'Symplify\EasyCodingStandard*',
'Symplify\EasyCodingStandard',
'Symplify\CodingStandard\*',
'Symplify\CodingStandard',
'PHP_CodeSniffer\*',
'PhpCsFixer\*',
], Here is the full PR with box and scoper: deprecated-packages/symplify#1734 |
Is it in the PHP file or just the service declaration? I would be surprised if the namespace whitelisting doesn't work properly, so I have higher suspicious of it not being done correctly for the Symfony service declaration files |
It's only prefixed in the config, that's why the class cannot be found. This is the workaround, but it hijacks 7 extra Symplify packages we don't need. -'Symplify\CodingStandard\*',
+'Symplify\*', |
Arg indeed https://github.com/humbug/php-scoper/blob/master/src/Scoper/Symfony/YamlScoper.php doesn't make use of the whitelist at all to check that... Probably the same for the XML one |
Correction: the YamlScoper does take that into account, the issue is with the logic itself. This scoper tries to go by regexes which I guess has its limitations... Maybe it's still possible to do so with it but I'm struggling a bit to do so |
I'm trying to create prefixed
ecs.phar
:But it prefixed the namespace in the file :/
What can I do to remove it?
The text was updated successfully, but these errors were encountered: