-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
Wildcard definition for class in global namespace matches any namespace #861
Comments
That's an interesting bug indeed, happy to merge a PR with a test that reproduces it + a fix! |
I'd be happy to, but would you be willing to release 6.3.6 to allow this fix to work on PHP 7.2? And then probably 6.4.1 as well for PHP 7.4. If so, should I branch from master and target my PR there, so you can backport the fix to 6.x? Or would you suggest another approach? |
Oh unfortunately I can't allocate time to support PHP 7.2, even PHP-DI 6, I'd rather avoid new releases for older versions unless there's a security issue or serious regression. |
Understandable, I have gone ahead and created the fix anyway, as it was quite simple and I hope to benefit from it in the future. Thanks! |
The project I am working on has quite some classes defined in the global namespace.
When adding a wildcard definition for these classes, not only those classes are matched, but also matching class names in any namespace.
This is quite unexpected, since the documentation states:
For example:
will call
foo('bar')
on classJobDoSomething
, but also on classSomeNamespace\JobScheduler
, which is not in the global namespace.I am unfortunately on version 6.3.5, because PHP 7.2 ... But the code for matching the wildcard (regex) looks to be equal in both 6.4 and master.
The text was updated successfully, but these errors were encountered: