-
-
Couldn't load subscription status.
- Fork 1.1k
Fix unprocessable entity deprecation warning #2870
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
base: main
Are you sure you want to change the base?
Fix unprocessable entity deprecation warning #2870
Conversation
2665855 to
269ad37
Compare
|
Ah, nice, thanks! Do you think you could fix the conflicts? (I tried to do it myself, but I couldn't write to the upstream.) |
|
@nickcharlton I'll give it a go 👍 |
I'm seeing this deprecation when using newer versions of `rack` with
request specs that use the `have_http_status` matcher [1] from newer
versions (v8?) of `rspec-rails`.
Status code :unprocessable_entity is deprecated and will be
removed in a future version of Rack.
Please use :unprocessable_content instead.
The `:unprocessable_entity` symbol was deprecated in `rack` in this
commit [2] which was released in `rack` v3.1.0 [3].
[1]: https://rspec.info/features/8-0/rspec-rails/matchers/have-http-status-matcher/
[2]: rack/rack#2137
[3]: https://github.com/rack/rack/blob/ee7ac5a1db5bc5c65e4b83342b8f4df88ef3c075/CHANGELOG.md#310---2024-06-11
269ad37 to
fb85d76
Compare
Done ✅ |
|
It's worth highlighting that this will only work with rack v3.1.0 or higher... |
|
Ah yes. I was hoping the tests would give us the answer to what wouldn't be supported, and I imagine that's it. Whilst we still have support for Rails 6.0 and 6.1 we'll leave this until it's dropped. Unless I'm remembering wrong, the plan would be to drop support after we release v1.0. Which is now planned for the 31st October. |
|
@nickcharlton I imagine those test failures are likely to be because you want to support Rails v6.0 & Rails v6.1 and I imagine they depend on an earlier version of Rack. Can you confirm that's the case and if so, do I need to make the fix work in those cases too? |
OK 👍 |
|
Yeah — let's just wait until we drop support. I already set myself up for a date we've got to hit and it's close enough to avoid making a whole lot of extra work. |
I'm seeing this deprecation when using newer versions of
rackwith request specs that use thehave_http_statusmatcher from newer versions (v8?) ofrspec-rails.The
:unprocessable_entitysymbol was deprecated inrackin this commit which was released inrackv3.1.0. It has been replaced by:unprocessable_content.