-
Notifications
You must be signed in to change notification settings - Fork 25
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
Mismatch between extended class name and the actual class name #27
Comments
@BrianHenryIE as a more general question, would you say polyfills like these should be excluded from Strauss treatments? Considering that for example this |
I didn't mean to close this. Still more work to do! |
OK, @alexmigf , the actual bug is fixed. But as @Spreeuw points out, this might not be worth prefixing. bootstrap.php operates in the global namespace. Strauss adds prefixes to existing namespaces, it does not add a namespace to files with none in them (although that's an interesting idea and could work as an alternative to prefixing classnames). So when our plugin autoloader runs, Symphony's boostrap is going to check for a global So the problem Strauss aims to solve is not correctly addressed here. And I don't think there is any benefit to prefixing the namespace. I've seen suggestions for unit testing global functions by redefining them inside the project root namespace. i.e. I'll leave this open for discussion and until I test that idea out. This is the config for excluding it, and this may end up being the default configuration: {
"require": {
"symfony/polyfill-intl-normalizer": "^1.23"
},
"extra": {
"strauss": {
"exclude_from_prefix": {
"packages": [
"symfony/polyfill-intl-normalizer"
]
}
}
}
} |
Hi @BrianHenryIE
We are facing an issue using your library with the
symfony/polyfill-intl-normalizer
, as the/Resources/stubs/Normalizer.php
extended class shows like this:when the actual
Normalizer.php
class name in the library root dir is:The error:
Uncaught Error: Class 'Normalizer_Test\Symfony\Polyfill\Intl\Normalizer_Test_Normalizer\Normalizer' not found in /lib/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php:9
You can easily test this using your
phar.php
and this JSON in a test directory:The text was updated successfully, but these errors were encountered: