Skip to content

Commit 2ab10fa

Browse files
committed
Configure config.active_support.cache_format_version = 7.1 for RailtieTest
This commit suppresses the `DEPRECATION WARNING: Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2.` warning at `RailtieTest` This commit sets `config.active_support.cache_format_version = 7.1` explicitly for `RailtieTest` because rails#48598 deprecates `active_support.cache_format_version = 6.1` and still the default format_version is 6.1, I think this is intended. https://github.com/rails/rails/blob/4ac237de74a1ff383a44f6dc04c0e8894633722b/activesupport/lib/active_support/cache.rb#L55 ``` @format_version = 6.1 ``` \### Steps to reproduce ``` git clone https://github.com/rails/rails cd rails/activemodel bundle bin/test test/cases/railtie_test.rb:21 ``` \### Without this commit ``` $ bin/test test/cases/railtie_test.rb:21 Run options: --seed 36872 \# Running: DEPRECATION WARNING: Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2. Check the Rails upgrade guide at https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format for more information on how to upgrade. (called from block (3 levels) in run at /home/yahonda/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/minitest-5.19.0/lib/minitest/test.rb:94) . Finished in 0.321429s, 3.1111 runs/s, 3.1111 assertions/s. 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips $ ``` \### With this commit ``` $ bin/test test/cases/railtie_test.rb:21 Run options: --seed 65282 \# Running: Finished in 0.006108s, 0.0000 runs/s, 0.0000 assertions/s. 0 runs, 0 assertions, 0 failures, 0 errors, 0 skips $ ```
1 parent 4ac237d commit 2ab10fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

activemodel/test/cases/railtie_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def setup
1515
@app ||= Class.new(::Rails::Application) do
1616
config.eager_load = false
1717
config.logger = fake_logger
18+
config.active_support.cache_format_version = 7.1
1819
end
1920
end
2021

0 commit comments

Comments
 (0)