-
Notifications
You must be signed in to change notification settings - Fork 983
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
removal of proc mechanism for middleware #1389
Comments
…rings or procs * Update UPGRADING.md to explain the original removal from v2.0 * Update CHANGELOG.md to point to the `releases` page Fixes #1389
@notEthan thanks a lot for raising this and for sharing your concerns. I'm also sorry if the I've opened #1391 to address both this issues, and I've also pointed out in the Thanks for all the useful feedback, and I hope this will let you keep the existing code. |
Reintroduce the possibility to register middleware with symbols, strings or procs. Fixes #1389
Reintroduce the possibility to register middleware with symbols, strings or procs. Fixes #1389
fantastic, I really appreciate the positive response. everything seems to be compatible again, pointing my code at that PR branch. thanks very much for all your good work on this gem and the whole ecosystem. |
@notEthan Thanks for making sure the solution worked for you! Cheers! |
Thanks for confirming @notEthan, I'm shipping v2.2 now 🎉 |
following PR #1301: Autoloading, dependency loading and middleware registry cleanup
I can no longer register middleware like:
this removal is unfortunate. that PR says "This change should not affect you directly" - but this has been a publicly documented method of registering middleware for a very long time. I have been using this mechanism for at least 8 years across a number of applications and gems. I'm sure I am far from the only one.
I understand refactorings made this method of registration no longer needed by faraday itself, but this was a very useful mechanism for me. I could offer faraday middleware, but avoid the overhead of loading the associated implementation unless/until the application requires it.
deferring also helped ease dependency resolution - I'll have to refactor to put faraday code later in a number of places. this part is not a huge deal, but was a convenient thing that has been lost.
I really hope you'll consider restoring support for this. it's a better way to register middleware, in my opinion.
it's also surprising to see no warnings about deprecation or anything. on upgrading, I just get a meaningless message from faraday's internals:
I looked in the CHANGELOG.md but faraday 2 isn't even mentioned. after eventually finding the PR with this change I realized there's another file, UPGRADING.md, that I had not noticed, not linked from the readme or anywhere. this change is not very well communicated.
The text was updated successfully, but these errors were encountered: