-
Notifications
You must be signed in to change notification settings - Fork 15
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
disable everything related to failure when failure_transport not configured in mesenger #18
Comments
WDYT @weaverryan ? maybe not worth the pain to do that... 🤔 |
Indeed. If we disable things based on the configuration of a different service, it would need to be done in a compiler pass. But it is a nice thing to do. So: a) Probably let's not worry about routes. But I guess we could at least write those controllers so that if you try to access them, they give you a good error about needing the failure transport to be configured. b) Removing the services would be nice, in a compiler pass. And, we may (?) not need to remove many. What I mean is, we would just need to remove any event listeners and any service we use directly in those failure controllers. If there are some additional, lower-level services that these other services depend on, we don't really need to remove those, as the container would remove them automatically because we removed all services using them, if that makes sene :p |
but the problem is: if i remove from the container the services which are injected in the controllers, i may have an error when building the container, won't I ? |
Yep, you'll need to make those services optional - so with the It's not super clean... but it would be nice to clean things up. |
or i create another controller which handles these routes when failure transport is not configured |
or i create the custom route loader. I've never done that, but i'm sure that's not that complicated |
I like both of these ideas :). You can try the custom route loader... though... at the end of the day, I kinda prefer the user to be able to see the routes they're importing inside their app versus them being magically loaded somehow (and this will allow them to control the prefix - not sure how that works with custom route loaders) |
ok, i agree, that's better if the user can see easily the routes we're adding; go for this solution! |
btw, you can add a prefix even with a custom route loader |
(not sure about this one...)
The text was updated successfully, but these errors were encountered: