You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEPRECATION WARNING: Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2
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.
require "spec_helper"
# NOTE: this is a fix for graphql-fragment_cache, which is initializing it's own cache in the test environment
require "active_support/cache"
ActiveSupport::Cache.format_version = 7.1
require File.expand_path("../config/environment", __dir__)
require "rspec/rails"
RSpec.configure do |config|
...
The text was updated successfully, but these errors were encountered:
asgeo1
changed the title
Rails 7.1 deprecation notice for cache_format_version
Rails 7.1 deprecation notice for cache_format_version in Rails test environment
May 9, 2024
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: