Closed scheb closed 4 years ago
Hmm, tricky issue 🤔
Might look selfish, but the fact that other bundles will have the same issue (thanks @maxhelias for finding that), I tend to say the solution from the Sentry bundle may be problem here. Because using class_alias may be a clever solution on the first view, but effectively it creates a class name in a foreign namespace, one that should be under control of Symfony. And this change becomes globally visible to everything in that PHP runtime context.
If you want to use class_alias for it, I think a better way would be instead of creating an alias in the foreign Symfony namespace, create a "proxy alias" in the local namespace. One that points either to RequestEvent or GetResponseEvent.
If you want to use class_alias for it, I think a better way would be instead of creating an alias in the foreign Symfony namespace, create a "proxy alias" in the local namespace. One that points either to RequestEvent or GetResponseEvent.
Looks like FriendsOfSymfony/FOSHttpCacheBundle
is doing exactly that, with an alias in the local namespace:
^ They're working on it.
I expect the next Sentry release will solve this issue. Therefore closing this issue here.
Sentry version >= 3.4.1 solves the problem.
Awesome, thanks!
Bundle version: >= 4.6.0 Symfony version: < 4.4
Original message by @PierrickMartos in #233