-
Notifications
You must be signed in to change notification settings - Fork 34
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
Rails 7.1 deprecation notice for cache_format_version
in Rails test
environment
#114
Comments
cache_format_version
cache_format_version
in Rails test
environment
I can confirm this is still an issue in latest The line where the warning happens is now different though:
For now I'm using the suggested workaround as well (setting format_version before the gem is loaded in test environment). |
@DmitryTsepelev Rails 7.2 is out and the |
Just upgraded from 1.20.2 to 1.20.4 and it EDIT: ops! too early! It seems the warning is back: The issue is that Tried to tackle this issue and opened PR at #120 😃 |
This line of code in this gem, is producing a deprecation warning with Rails 7.1
graphql-ruby-fragment_cache/lib/graphql/fragment_cache/railtie.rb
Line 28 in 1c08b1f
But only in the
test
environment.It doesn't matter if you set
config.active_support.cache_format_version = 7.1
in the Rails environment or intializer, the deprecation warning will still happen.This is because that line of code is executing before Rails gets a chance to boot and set the correct
cache_format_version
.If using RSpec, a possible workaround for now, is in
rails_helper.rb
to set the cache format version prior to the gem being loaded. e.g.The text was updated successfully, but these errors were encountered: