From 1b455e2e9d6937d4107e19cb32e2f98aa08886b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 4 Feb 2021 16:46:53 +0000 Subject: [PATCH] Rails 6.2 is now Rails 7.0 We have big plans for the next version of Rails and that require big versions. --- Gemfile.lock | 108 +++++++++--------- RAILS_VERSION | 2 +- actioncable/lib/action_cable/gem_version.rb | 4 +- actioncable/package.json | 2 +- .../mailgun/inbound_emails_controller.rb | 4 +- .../lib/action_mailbox/gem_version.rb | 4 +- .../lib/action_mailer/delivery_job.rb | 2 +- actionmailer/lib/action_mailer/gem_version.rb | 4 +- .../lib/action_mailer/message_delivery.rb | 2 +- .../lib/action_dispatch/http/response.rb | 4 +- .../middleware/host_authorization.rb | 2 +- .../lib/action_dispatch/routing/route_set.rb | 4 +- .../action_dispatch/testing/test_process.rb | 4 +- actionpack/lib/action_pack/gem_version.rb | 4 +- actionpack/test/controller/test_case_test.rb | 2 +- actiontext/lib/action_text/gem_version.rb | 4 +- actiontext/package.json | 2 +- actionview/lib/action_view/gem_version.rb | 4 +- actionview/lib/action_view/railtie.rb | 2 +- actionview/package.json | 2 +- activejob/lib/active_job/callbacks.rb | 2 +- activejob/lib/active_job/gem_version.rb | 4 +- .../lib/active_model/attribute_set/builder.rb | 2 +- activemodel/lib/active_model/errors.rb | 6 +- activemodel/lib/active_model/gem_version.rb | 4 +- .../abstract/connection_pool.rb | 2 +- .../connection_adapters/abstract/quoting.rb | 6 +- activerecord/lib/active_record/core.rb | 4 +- .../active_record/database_configurations.rb | 2 +- .../database_configurations/hash_config.rb | 2 +- activerecord/lib/active_record/gem_version.rb | 4 +- .../lib/active_record/legacy_yaml_adapter.rb | 2 +- .../lib/active_record/model_schema.rb | 2 +- .../lib/active_record/railties/databases.rake | 16 +-- .../active_record/relation/calculations.rb | 4 +- .../active_record/relation/finder_methods.rb | 2 +- .../active_record/relation/query_methods.rb | 4 +- .../active_record/relation/where_clause.rb | 4 +- .../lib/active_record/tasks/database_tasks.rb | 2 +- activerecord/test/cases/calculations_test.rb | 8 +- .../test/cases/relation/merging_test.rb | 4 +- activerecord/test/cases/relations_test.rb | 2 +- .../lib/active_storage/gem_version.rb | 4 +- activestorage/package.json | 2 +- .../lib/active_support/core_ext/uri.rb | 2 +- .../lib/active_support/deprecation.rb | 2 +- .../lib/active_support/gem_version.rb | 4 +- .../lib/active_support/multibyte/unicode.rb | 4 +- activesupport/lib/active_support/railtie.rb | 2 +- ..._release_notes.md => 7_0_release_notes.md} | 10 +- guides/source/_welcome.html.erb | 2 +- guides/source/configuring.md | 2 +- guides/source/documents.yaml | 6 +- guides/source/maintenance_policy.md | 6 +- guides/source/upgrading_ruby_on_rails.md | 2 +- .../lib/rails/application/configuration.rb | 2 +- railties/lib/rails/gem_version.rb | 4 +- ...rb.tt => new_framework_defaults_7_0.rb.tt} | 2 +- railties/test/application/rake/dbs_test.rb | 4 +- .../test/application/rake/multi_dbs_test.rb | 2 +- version.rb | 4 +- 61 files changed, 160 insertions(+), 160 deletions(-) rename guides/source/{6_2_release_notes.md => 7_0_release_notes.md} (95%) rename railties/lib/rails/generators/rails/app/templates/config/initializers/{new_framework_defaults_6_2.rb.tt => new_framework_defaults_7_0.rb.tt} (95%) diff --git a/Gemfile.lock b/Gemfile.lock index 944808f21f..63e2e2bc9d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,83 +30,83 @@ GIT PATH remote: . specs: - actioncable (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actioncable (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - activejob (= 6.2.0.alpha) - activerecord (= 6.2.0.alpha) - activestorage (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actionmailbox (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + activejob (= 7.0.0.alpha) + activerecord (= 7.0.0.alpha) + activestorage (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) mail (>= 2.7.1) - actionmailer (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - actionview (= 6.2.0.alpha) - activejob (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actionmailer (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + actionview (= 7.0.0.alpha) + activejob (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.2.0.alpha) - actionview (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actionpack (7.0.0.alpha) + actionview (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - activerecord (= 6.2.0.alpha) - activestorage (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actiontext (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + activerecord (= 7.0.0.alpha) + activestorage (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) nokogiri (>= 1.8.5) - actionview (6.2.0.alpha) - activesupport (= 6.2.0.alpha) + actionview (7.0.0.alpha) + activesupport (= 7.0.0.alpha) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.2.0.alpha) - activesupport (= 6.2.0.alpha) + activejob (7.0.0.alpha) + activesupport (= 7.0.0.alpha) globalid (>= 0.3.6) - activemodel (6.2.0.alpha) - activesupport (= 6.2.0.alpha) - activerecord (6.2.0.alpha) - activemodel (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) - activestorage (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - activejob (= 6.2.0.alpha) - activerecord (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + activemodel (7.0.0.alpha) + activesupport (= 7.0.0.alpha) + activerecord (7.0.0.alpha) + activemodel (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) + activestorage (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + activejob (= 7.0.0.alpha) + activerecord (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) marcel (~> 0.3.1) mimemagic (~> 0.3.2) - activesupport (6.2.0.alpha) + activesupport (7.0.0.alpha) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - rails (6.2.0.alpha) - actioncable (= 6.2.0.alpha) - actionmailbox (= 6.2.0.alpha) - actionmailer (= 6.2.0.alpha) - actionpack (= 6.2.0.alpha) - actiontext (= 6.2.0.alpha) - actionview (= 6.2.0.alpha) - activejob (= 6.2.0.alpha) - activemodel (= 6.2.0.alpha) - activerecord (= 6.2.0.alpha) - activestorage (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + rails (7.0.0.alpha) + actioncable (= 7.0.0.alpha) + actionmailbox (= 7.0.0.alpha) + actionmailer (= 7.0.0.alpha) + actionpack (= 7.0.0.alpha) + actiontext (= 7.0.0.alpha) + actionview (= 7.0.0.alpha) + activejob (= 7.0.0.alpha) + activemodel (= 7.0.0.alpha) + activerecord (= 7.0.0.alpha) + activestorage (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) bundler (>= 1.15.0) - railties (= 6.2.0.alpha) + railties (= 7.0.0.alpha) sprockets-rails (>= 2.0.0) - railties (6.2.0.alpha) - actionpack (= 6.2.0.alpha) - activesupport (= 6.2.0.alpha) + railties (7.0.0.alpha) + actionpack (= 7.0.0.alpha) + activesupport (= 7.0.0.alpha) method_source rake (>= 0.8.7) thor (~> 1.0) @@ -553,8 +553,6 @@ GEM websocket (1.2.9) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) - websocket-driver (0.7.3-java) - websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) diff --git a/RAILS_VERSION b/RAILS_VERSION index c75e05da84..9c4d836e69 100644 --- a/RAILS_VERSION +++ b/RAILS_VERSION @@ -1 +1 @@ -6.2.0.alpha +7.0.0.alpha diff --git a/actioncable/lib/action_cable/gem_version.rb b/actioncable/lib/action_cable/gem_version.rb index 9e655cbce2..2391cf7a26 100644 --- a/actioncable/lib/action_cable/gem_version.rb +++ b/actioncable/lib/action_cable/gem_version.rb @@ -7,8 +7,8 @@ module ActionCable end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actioncable/package.json b/actioncable/package.json index 08bad4f5fc..62494a1c74 100644 --- a/actioncable/package.json +++ b/actioncable/package.json @@ -1,6 +1,6 @@ { "name": "@rails/actioncable", - "version": "6.2.0-alpha", + "version": "7.0.0-alpha", "description": "WebSocket framework for Ruby on Rails.", "main": "app/assets/javascripts/action_cable.js", "files": [ diff --git a/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb b/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb index 42f4fee1fa..cd934a0dc7 100644 --- a/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb +++ b/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb @@ -79,13 +79,13 @@ module ActionMailbox def key if Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key) ActiveSupport::Deprecation.warn(<<-MSG.squish) - Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 6.2. + Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 7.0. Use Rails.application.credentials.action_mailbox.signing_key instead. MSG Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key) elsif ENV["MAILGUN_INGRESS_API_KEY"] ActiveSupport::Deprecation.warn(<<-MSG.squish) - The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 6.2. + The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 7.0. Use MAILGUN_INGRESS_SIGNING_KEY instead. MSG ENV["MAILGUN_INGRESS_API_KEY"] diff --git a/actionmailbox/lib/action_mailbox/gem_version.rb b/actionmailbox/lib/action_mailbox/gem_version.rb index 9178c6b780..dfb69f8c3d 100644 --- a/actionmailbox/lib/action_mailbox/gem_version.rb +++ b/actionmailbox/lib/action_mailbox/gem_version.rb @@ -7,8 +7,8 @@ module ActionMailbox end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actionmailer/lib/action_mailer/delivery_job.rb b/actionmailer/lib/action_mailer/delivery_job.rb index cc38bd5f73..8fde52b8fc 100644 --- a/actionmailer/lib/action_mailer/delivery_job.rb +++ b/actionmailer/lib/action_mailer/delivery_job.rb @@ -15,7 +15,7 @@ module ActionMailer before_perform do ActiveSupport::Deprecation.warn <<~MSG.squish Sending mail with DeliveryJob and Parameterized::DeliveryJob - is deprecated and will be removed in Rails 6.2. + is deprecated and will be removed in Rails 7.0. Please use MailDeliveryJob instead. MSG end diff --git a/actionmailer/lib/action_mailer/gem_version.rb b/actionmailer/lib/action_mailer/gem_version.rb index 1711a7ebd6..2a4dea0e15 100644 --- a/actionmailer/lib/action_mailer/gem_version.rb +++ b/actionmailer/lib/action_mailer/gem_version.rb @@ -7,8 +7,8 @@ module ActionMailer end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actionmailer/lib/action_mailer/message_delivery.rb b/actionmailer/lib/action_mailer/message_delivery.rb index 0986364b0d..7eef39701c 100644 --- a/actionmailer/lib/action_mailer/message_delivery.rb +++ b/actionmailer/lib/action_mailer/message_delivery.rb @@ -150,7 +150,7 @@ module ActionMailer @mailer_class.name, @action.to_s, delivery_method.to_s, *@args) else ActiveSupport::Deprecation.warn(<<~EOM) - In Rails 6.2, Action Mailer will pass the mail arguments inside the `:args` keyword argument. + In Rails 7.0, Action Mailer will pass the mail arguments inside the `:args` keyword argument. The `perform` method of the #{job} needs to change and forward the mail arguments from the `args` keyword argument. diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 8cf733b96d..af8c853832 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -88,13 +88,13 @@ module ActionDispatch # :nodoc: def self.return_only_media_type_on_content_type=(*) ActiveSupport::Deprecation.warn( - ".return_only_media_type_on_content_type= is dreprecated with no replacement and will be removed in 6.2." + ".return_only_media_type_on_content_type= is dreprecated with no replacement and will be removed in 7.0." ) end def self.return_only_media_type_on_content_type ActiveSupport::Deprecation.warn( - ".return_only_media_type_on_content_type is dreprecated with no replacement and will be removed in 6.2." + ".return_only_media_type_on_content_type is dreprecated with no replacement and will be removed in 7.0." ) end diff --git a/actionpack/lib/action_dispatch/middleware/host_authorization.rb b/actionpack/lib/action_dispatch/middleware/host_authorization.rb index 4564bdafe0..0357a34781 100644 --- a/actionpack/lib/action_dispatch/middleware/host_authorization.rb +++ b/actionpack/lib/action_dispatch/middleware/host_authorization.rb @@ -78,7 +78,7 @@ module ActionDispatch unless deprecated_response_app.nil? ActiveSupport::Deprecation.warn(<<-MSG.squish) - `action_dispatch.hosts_response_app` is deprecated and will be ignored in Rails 6.2. + `action_dispatch.hosts_response_app` is deprecated and will be ignored in Rails 7.0. Use the Host Authorization `response_app` setting instead. MSG diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 7c486eee61..6686200cbc 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -596,14 +596,14 @@ module ActionDispatch if route.segment_keys.include?(:controller) ActiveSupport::Deprecation.warn(<<-MSG.squish) Using a dynamic :controller segment in a route is deprecated and - will be removed in Rails 6.2. + will be removed in Rails 7.0. MSG end if route.segment_keys.include?(:action) ActiveSupport::Deprecation.warn(<<-MSG.squish) Using a dynamic :action segment in a route is deprecated and - will be removed in Rails 6.2. + will be removed in Rails 7.0. MSG end diff --git a/actionpack/lib/action_dispatch/testing/test_process.rb b/actionpack/lib/action_dispatch/testing/test_process.rb index 1d0e3d1fa9..2c8b51b583 100644 --- a/actionpack/lib/action_dispatch/testing/test_process.rb +++ b/actionpack/lib/action_dispatch/testing/test_process.rb @@ -25,14 +25,14 @@ module ActionDispatch if !self.class.file_fixture_path ActiveSupport::Deprecation.warn(<<~EOM) Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated. - In Rails 6.2, the path needs to be relative to `file_fixture_path` which you + In Rails 7.0, the path needs to be relative to `file_fixture_path` which you haven't set yet. Set `file_fixture_path` to discard this warning. EOM elsif path.exist? non_deprecated_path = Pathname(File.absolute_path(path)).relative_path_from(Pathname(File.absolute_path(self.class.file_fixture_path))) ActiveSupport::Deprecation.warn(<<~EOM) Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated. - In Rails 6.2, the path needs to be relative to `file_fixture_path`. + In Rails 7.0, the path needs to be relative to `file_fixture_path`. Please modify the call from `fixture_file_upload("#{original_path}")` to `fixture_file_upload("#{non_deprecated_path}")`. diff --git a/actionpack/lib/action_pack/gem_version.rb b/actionpack/lib/action_pack/gem_version.rb index 4c5244d72b..4725f7f691 100644 --- a/actionpack/lib/action_pack/gem_version.rb +++ b/actionpack/lib/action_pack/gem_version.rb @@ -7,8 +7,8 @@ module ActionPack end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index bb373baade..445b1c0aac 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -934,7 +934,7 @@ XML def test_fixture_file_upload_output_deprecation_when_file_fixture_path_is_not_set TestCaseTest.stub :fixture_path, File.expand_path("../fixtures", __dir__) do TestCaseTest.stub :file_fixture_path, nil do - assert_deprecated(/In Rails 6.2, the path needs to be relative to `file_fixture_path`/) do + assert_deprecated(/In Rails 7.0, the path needs to be relative to `file_fixture_path`/) do fixture_file_upload("multipart/ruby_on_rails.jpg", "image/jpg") end end diff --git a/actiontext/lib/action_text/gem_version.rb b/actiontext/lib/action_text/gem_version.rb index fd242c1877..1da63bc806 100644 --- a/actiontext/lib/action_text/gem_version.rb +++ b/actiontext/lib/action_text/gem_version.rb @@ -7,8 +7,8 @@ module ActionText end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actiontext/package.json b/actiontext/package.json index 8cc8c9695b..4bebab9754 100644 --- a/actiontext/package.json +++ b/actiontext/package.json @@ -1,6 +1,6 @@ { "name": "@rails/actiontext", - "version": "6.2.0-alpha", + "version": "7.0.0-alpha", "description": "Edit and display rich text in Rails applications", "main": "app/javascript/actiontext/index.js", "files": [ diff --git a/actionview/lib/action_view/gem_version.rb b/actionview/lib/action_view/gem_version.rb index c360c878b9..deec60f3eb 100644 --- a/actionview/lib/action_view/gem_version.rb +++ b/actionview/lib/action_view/gem_version.rb @@ -7,8 +7,8 @@ module ActionView end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 1e2a86fc6d..19e269ce57 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -59,7 +59,7 @@ module ActionView app.config.action_view.each do |k, v| if k == :raise_on_missing_translations ActiveSupport::Deprecation.warn \ - "action_view.raise_on_missing_translations is deprecated and will be removed in Rails 6.2. " \ + "action_view.raise_on_missing_translations is deprecated and will be removed in Rails 7.0. " \ "Set i18n.raise_on_missing_translations instead. " \ "Note that this new setting also affects how missing translations are handled in controllers." end diff --git a/actionview/package.json b/actionview/package.json index 91ab13d980..b4d87e90fe 100644 --- a/actionview/package.json +++ b/actionview/package.json @@ -1,6 +1,6 @@ { "name": "@rails/ujs", - "version": "6.2.0-alpha", + "version": "7.0.0-alpha", "description": "Ruby on Rails unobtrusive scripting adapter", "main": "lib/assets/compiled/rails-ujs.js", "files": [ diff --git a/activejob/lib/active_job/callbacks.rb b/activejob/lib/active_job/callbacks.rb index dbae602ba9..a5f82bd470 100644 --- a/activejob/lib/active_job/callbacks.rb +++ b/activejob/lib/active_job/callbacks.rb @@ -186,7 +186,7 @@ module ActiveJob if !self.class.skip_after_callbacks_if_terminated && callbacks.any? { |c| c.kind == :after } ActiveSupport::Deprecation.warn(<<~EOM) - In Rails 6.2, `after_enqueue`/`after_perform` callbacks no longer run if `before_enqueue`/`before_perform` respectively halts with `throw :abort`. + In Rails 7.0, `after_enqueue`/`after_perform` callbacks no longer run if `before_enqueue`/`before_perform` respectively halts with `throw :abort`. To enable this behavior, uncomment the `config.active_job.skip_after_callbacks_if_terminated` config in the new 6.1 framework defaults initializer. EOM diff --git a/activejob/lib/active_job/gem_version.rb b/activejob/lib/active_job/gem_version.rb index a0e10e76d0..65b507e2ff 100644 --- a/activejob/lib/active_job/gem_version.rb +++ b/activejob/lib/active_job/gem_version.rb @@ -7,8 +7,8 @@ module ActiveJob end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/activemodel/lib/active_model/attribute_set/builder.rb b/activemodel/lib/active_model/attribute_set/builder.rb index a6559ac02d..6381aa6593 100644 --- a/activemodel/lib/active_model/attribute_set/builder.rb +++ b/activemodel/lib/active_model/attribute_set/builder.rb @@ -146,7 +146,7 @@ module ActiveModel def marshal_load(values) if values.is_a?(Hash) ActiveSupport::Deprecation.warn(<<~MSG) - Marshalling load from legacy attributes format is deprecated and will be removed in Rails 6.2. + Marshalling load from legacy attributes format is deprecated and will be removed in Rails 7.0. MSG empty_hash = {}.freeze initialize(empty_hash, empty_hash, empty_hash, empty_hash, values) diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 618753a203..77a4bdb3a7 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -249,7 +249,7 @@ module ActiveModel You are passing a block expecting two parameters, so the old hash behavior is simulated. As this is deprecated, - this will result in an ArgumentError in Rails 6.2. + this will result in an ArgumentError in Rails 7.0. MSG @errors. sort { |a, b| a.attribute <=> b.attribute }. @@ -325,7 +325,7 @@ module ActiveModel def to_h ActiveSupport::Deprecation.warn(<<~EOM) - ActiveModel::Errors#to_h is deprecated and will be removed in Rails 6.2. + ActiveModel::Errors#to_h is deprecated and will be removed in Rails 7.0. Please use `ActiveModel::Errors.to_hash` instead. The values in the hash returned by `ActiveModel::Errors.to_hash` is an array of error messages. EOM @@ -591,7 +591,7 @@ module ActiveModel end def deprecation_removal_warning(method_name, alternative_message = nil) - message = +"ActiveModel::Errors##{method_name} is deprecated and will be removed in Rails 6.2." + message = +"ActiveModel::Errors##{method_name} is deprecated and will be removed in Rails 7.0." if alternative_message message << "\n\nTo achieve the same use:\n\n " message << alternative_message diff --git a/activemodel/lib/active_model/gem_version.rb b/activemodel/lib/active_model/gem_version.rb index 36b247a197..59f6a8488e 100644 --- a/activemodel/lib/active_model/gem_version.rb +++ b/activemodel/lib/active_model/gem_version.rb @@ -7,8 +7,8 @@ module ActiveModel end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 4f774bb7c4..7e0981e09c 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -1177,7 +1177,7 @@ module ActiveRecord return owner_to_pool_manager[owner] if owner_to_pool_manager.key?(owner) if owner == "primary" - ActiveSupport::Deprecation.warn("Using `\"primary\"` as a `connection_specification_name` is deprecated and will be removed in Rails 6.2.0. Please use `ActiveRecord::Base`.") + ActiveSupport::Deprecation.warn("Using `\"primary\"` as a `connection_specification_name` is deprecated and will be removed in Rails 7.0.0. Please use `ActiveRecord::Base`.") owner_to_pool_manager[Base.name] end end diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index d70f517342..143cd32606 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -12,7 +12,7 @@ module ActiveRecord if value.is_a?(Base) ActiveSupport::Deprecation.warn(<<~MSG) Passing an Active Record object to `quote` directly is deprecated - and will be no longer quoted as id value in Rails 6.2. + and will be no longer quoted as id value in Rails 7.0. MSG value = value.id_for_database end @@ -27,14 +27,14 @@ module ActiveRecord if value.is_a?(Base) ActiveSupport::Deprecation.warn(<<~MSG) Passing an Active Record object to `type_cast` directly is deprecated - and will be no longer type casted as id value in Rails 6.2. + and will be no longer type casted as id value in Rails 7.0. MSG value = value.id_for_database end if column ActiveSupport::Deprecation.warn(<<~MSG) - Passing a column to `type_cast` is deprecated and will be removed in Rails 6.2. + Passing a column to `type_cast` is deprecated and will be removed in Rails 7.0. MSG type = lookup_cast_type_from_column(column) value = type.serialize(value) diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 3d32c04ac5..6c0932d57e 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -291,11 +291,11 @@ module ActiveRecord end def self.allow_unsafe_raw_sql # :nodoc: - ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql is deprecated and will be removed in Rails 6.2") + ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql is deprecated and will be removed in Rails 7.0") end def self.allow_unsafe_raw_sql=(value) # :nodoc: - ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql= is deprecated and will be removed in Rails 6.2") + ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql= is deprecated and will be removed in Rails 7.0") end self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb index 9ec9b0aea6..8cc9338727 100644 --- a/activerecord/lib/active_record/database_configurations.rb +++ b/activerecord/lib/active_record/database_configurations.rb @@ -40,7 +40,7 @@ module ActiveRecord def configs_for(env_name: nil, spec_name: nil, name: nil, include_replicas: false) if spec_name name = spec_name - ActiveSupport::Deprecation.warn("The kwarg `spec_name` is deprecated in favor of `name`. `spec_name` will be removed in Rails 6.2") + ActiveSupport::Deprecation.warn("The kwarg `spec_name` is deprecated in favor of `name`. `spec_name` will be removed in Rails 7.0") end env_name ||= default_env if name diff --git a/activerecord/lib/active_record/database_configurations/hash_config.rb b/activerecord/lib/active_record/database_configurations/hash_config.rb index 18b109ce6f..66d0abb83b 100644 --- a/activerecord/lib/active_record/database_configurations/hash_config.rb +++ b/activerecord/lib/active_record/database_configurations/hash_config.rb @@ -32,7 +32,7 @@ module ActiveRecord end def config - ActiveSupport::Deprecation.warn("DatabaseConfig#config will be removed in 6.2.0 in favor of DatabaseConfigurations#configuration_hash which returns a hash with symbol keys") + ActiveSupport::Deprecation.warn("DatabaseConfig#config will be removed in 7.0.0 in favor of DatabaseConfigurations#configuration_hash which returns a hash with symbol keys") configuration_hash.stringify_keys end diff --git a/activerecord/lib/active_record/gem_version.rb b/activerecord/lib/active_record/gem_version.rb index d7e853ec02..18dad9b1e7 100644 --- a/activerecord/lib/active_record/gem_version.rb +++ b/activerecord/lib/active_record/gem_version.rb @@ -7,8 +7,8 @@ module ActiveRecord end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/activerecord/lib/active_record/legacy_yaml_adapter.rb b/activerecord/lib/active_record/legacy_yaml_adapter.rb index 252d608ea0..6ba9a62735 100644 --- a/activerecord/lib/active_record/legacy_yaml_adapter.rb +++ b/activerecord/lib/active_record/legacy_yaml_adapter.rb @@ -10,7 +10,7 @@ module ActiveRecord else ActiveSupport::Deprecation.warn(<<-MSG.squish) YAML loading from legacy format older than Rails 5.0 is deprecated - and will be removed in Rails 6.2. + and will be removed in Rails 7.0. MSG if coder["attributes"].is_a?(ActiveModel::AttributeSet) Rails420.convert(klass, coder) diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 78c785677f..b7d4a202b8 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -630,7 +630,7 @@ module ActiveRecord if column.sql_type.start_with?("interval") precision_arguments = column.precision.presence && ", precision: #{column.precision}" ActiveSupport::Deprecation.warn(<<~WARNING) - The behavior of the `:interval` type will be changing in Rails 6.2 + The behavior of the `:interval` type will be changing in Rails 7.0 to return an `ActiveSupport::Duration` object. If you'd like to keep the old behavior, you can add this line to #{self.name} model: diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 65c2570d59..18c7675fc7 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -434,7 +434,7 @@ db_namespace = namespace :db do task load_if_ruby: ["db:create", :environment] do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:schema:load_if_ruby` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:schema:load_if_ruby` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :ruby` to use `schema.rb` and run `bin/rails db:schema:load` instead. MSG db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby @@ -497,7 +497,7 @@ db_namespace = namespace :db do desc "Dumps the database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql" task dump: :load_config do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump` instead. MSG @@ -508,7 +508,7 @@ db_namespace = namespace :db do desc "Recreates the databases from the structure.sql file" task load: [:load_config, :check_protected_environments] do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:structure:load` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:structure:load` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead. MSG db_namespace["schema:load"].invoke @@ -516,7 +516,7 @@ db_namespace = namespace :db do task load_if_sql: ["db:create", :environment] do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:structure:load_if_sql` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:structure:load_if_sql` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead. MSG db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :sql @@ -527,7 +527,7 @@ db_namespace = namespace :db do desc "Dumps the #{name} database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql" task name => :load_config do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:structure:dump:#{name}` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:structure:dump:#{name}` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump:#{name}` instead. MSG db_namespace["schema:dump:#{name}"].invoke @@ -541,7 +541,7 @@ db_namespace = namespace :db do desc "Recreates the #{name} database from the structure.sql file" task name => :load_config do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:structure:load:#{name}` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:structure:load:#{name}` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load:#{name}` instead. MSG db_namespace["schema:load:#{name}"].invoke @@ -573,7 +573,7 @@ db_namespace = namespace :db do # desc "Recreate the test database from an existent structure.sql file" task load_structure: %w(db:test:purge) do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:test:load_structure` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:test:load_structure` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_schema` instead. MSG db_namespace["test:load_schema"].invoke @@ -620,7 +620,7 @@ db_namespace = namespace :db do namespace :load_structure do task name => "db:test:purge:#{name}" do ActiveSupport::Deprecation.warn(<<-MSG.squish) - Using `bin/rails db:test:load_structure:#{name}` is deprecated and will be removed in Rails 6.2. + Using `bin/rails db:test:load_structure:#{name}` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_structure:#{name}` instead. MSG db_namespace["test:load_schema:#{name}"].invoke diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 487bf2b143..5252674ef2 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -320,8 +320,8 @@ module ActiveRecord unless group_fields == group_values ActiveSupport::Deprecation.warn(<<-MSG.squish) - `#{operation}` with group by duplicated fields does no longer affect to result in Rails 6.2. - To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields + `#{operation}` with group by duplicated fields does no longer affect to result in Rails 7.0. + To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields (`#{klass.name&.tableize || klass.table_name}.uniq!(:group).#{operation}(#{column_name.inspect})`). MSG group_fields = group_values diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 97a19c2e6e..5d4f535c81 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -395,7 +395,7 @@ module ActiveRecord blank_value = order_values.first ActiveSupport::Deprecation.warn(<<~MSG.squish) `.reorder(#{blank_value.inspect})` with `.first` / `.first!` no longer - takes non-deterministic result in Rails 6.2. + takes non-deterministic result in Rails 7.0. To continue taking non-deterministic result, use `.take` / `.take!` instead. MSG end diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 1c5b6f87cc..9e8a68b0e1 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -1208,8 +1208,8 @@ module ActiveRecord annotates = annotates.uniq if annotates.size > 1 unless annotates == annotate_values ActiveSupport::Deprecation.warn(<<-MSG.squish) - Duplicated query annotations are no longer shown in queries in Rails 6.2. - To migrate to Rails 6.2's behavior, use `uniq!(:annotate)` to deduplicate query annotations + Duplicated query annotations are no longer shown in queries in Rails 7.0. + To migrate to Rails 7.0's behavior, use `uniq!(:annotate)` to deduplicate query annotations (`#{klass.name&.tableize || klass.table_name}.uniq!(:annotate)`). MSG annotates = annotate_values diff --git a/activerecord/lib/active_record/relation/where_clause.rb b/activerecord/lib/active_record/relation/where_clause.rb index 2d4b8d228c..48efad95f0 100644 --- a/activerecord/lib/active_record/relation/where_clause.rb +++ b/activerecord/lib/active_record/relation/where_clause.rb @@ -165,8 +165,8 @@ module ActiveRecord else ActiveSupport::Deprecation.warn(<<-MSG.squish) Merging (#{node.to_sql}) and (#{ref.to_sql}) no longer maintain - both conditions, and will be replaced by the latter in Rails 6.2. - To migrate to Rails 6.2's behavior, use `relation.merge(other, rewhere: true)`. + both conditions, and will be replaced by the latter in Rails 7.0. + To migrate to Rails 7.0's behavior, use `relation.merge(other, rewhere: true)`. MSG false end diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index ca8cadb439..91bf707273 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -384,7 +384,7 @@ module ActiveRecord db_config = resolve_configuration(configuration) if environment || name - ActiveSupport::Deprecation.warn("`environment` and `name` will be removed as parameters in 6.2.0, you may now pass an ActiveRecord::DatabaseConfigurations::DatabaseConfig as `configuration` instead.") + ActiveSupport::Deprecation.warn("`environment` and `name` will be removed as parameters in 7.0.0, you may now pass an ActiveRecord::DatabaseConfigurations::DatabaseConfig as `configuration` instead.") end name ||= db_config.name diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb index fb7c543b59..29e04be9cc 100644 --- a/activerecord/test/cases/calculations_test.rb +++ b/activerecord/test/cases/calculations_test.rb @@ -140,8 +140,8 @@ class CalculationsTest < ActiveRecord::TestCase [9, 9] => 53 } message = <<-MSG.squish - `maximum` with group by duplicated fields does no longer affect to result in Rails 6.2. - To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields + `maximum` with group by duplicated fields does no longer affect to result in Rails 7.0. + To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields (`accounts.uniq!(:group).maximum(:credit_limit)`). MSG assert_deprecated(message) do @@ -156,8 +156,8 @@ class CalculationsTest < ActiveRecord::TestCase [9, 9, 9, 9] => 53 } message = <<-MSG.squish - `minimum` with group by duplicated fields does no longer affect to result in Rails 6.2. - To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields + `minimum` with group by duplicated fields does no longer affect to result in Rails 7.0. + To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields (`accounts.uniq!(:group).minimum(:credit_limit)`). MSG assert_deprecated(message) do diff --git a/activerecord/test/cases/relation/merging_test.rb b/activerecord/test/cases/relation/merging_test.rb index 0da5dd7cbc..6ff7fcd374 100644 --- a/activerecord/test/cases/relation/merging_test.rb +++ b/activerecord/test/cases/relation/merging_test.rb @@ -361,8 +361,8 @@ class RelationMergingTest < ActiveRecord::TestCase end message = <<-MSG.squish - Duplicated query annotations are no longer shown in queries in Rails 6.2. - To migrate to Rails 6.2's behavior, use `uniq!(:annotate)` to deduplicate query annotations + Duplicated query annotations are no longer shown in queries in Rails 7.0. + To migrate to Rails 7.0's behavior, use `uniq!(:annotate)` to deduplicate query annotations (`posts.uniq!(:annotate)`). MSG assert_deprecated(message) do diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 4e88646a22..c72a7cc5e2 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1775,7 +1775,7 @@ class RelationTest < ActiveRecord::TestCase sql_log = capture_sql do message = <<~MSG.squish `.reorder(nil)` with `.first` / `.first!` no longer - takes non-deterministic result in Rails 6.2. + takes non-deterministic result in Rails 7.0. To continue taking non-deterministic result, use `.take` / `.take!` instead. MSG assert_deprecated(message) do diff --git a/activestorage/lib/active_storage/gem_version.rb b/activestorage/lib/active_storage/gem_version.rb index dcd8bf89c4..97cd2c8e8a 100644 --- a/activestorage/lib/active_storage/gem_version.rb +++ b/activestorage/lib/active_storage/gem_version.rb @@ -7,8 +7,8 @@ module ActiveStorage end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/activestorage/package.json b/activestorage/package.json index 64f241883f..daf7fbe657 100644 --- a/activestorage/package.json +++ b/activestorage/package.json @@ -1,6 +1,6 @@ { "name": "@rails/activestorage", - "version": "6.2.0-alpha", + "version": "7.0.0-alpha", "description": "Attach cloud and local files in Rails applications", "main": "app/assets/javascripts/activestorage.js", "files": [ diff --git a/activesupport/lib/active_support/core_ext/uri.rb b/activesupport/lib/active_support/core_ext/uri.rb index 1cb36f9f2e..fd5b0b31cc 100644 --- a/activesupport/lib/active_support/core_ext/uri.rb +++ b/activesupport/lib/active_support/core_ext/uri.rb @@ -20,7 +20,7 @@ module URI class << self def parser ActiveSupport::Deprecation.warn(<<-MSG.squish) - URI.parser is deprecated and will be removed in Rails 6.2. + URI.parser is deprecated and will be removed in Rails 7.0. Use `URI::DEFAULT_PARSER` instead. MSG URI::DEFAULT_PARSER diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index 887328dcc3..a9bc3a0936 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -38,7 +38,7 @@ module ActiveSupport # and the second is a library name. # # ActiveSupport::Deprecation.new('2.0', 'MyLibrary') - def initialize(deprecation_horizon = "7.0", gem_name = "Rails") + def initialize(deprecation_horizon = "7.1", gem_name = "Rails") self.gem_name = gem_name self.deprecation_horizon = deprecation_horizon # By default, warnings are not silenced and debugging is off. diff --git a/activesupport/lib/active_support/gem_version.rb b/activesupport/lib/active_support/gem_version.rb index 948d8ccc1e..89a3d1922b 100644 --- a/activesupport/lib/active_support/gem_version.rb +++ b/activesupport/lib/active_support/gem_version.rb @@ -7,8 +7,8 @@ module ActiveSupport end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/activesupport/lib/active_support/multibyte/unicode.rb b/activesupport/lib/active_support/multibyte/unicode.rb index 552790b05b..78906831df 100644 --- a/activesupport/lib/active_support/multibyte/unicode.rb +++ b/activesupport/lib/active_support/multibyte/unicode.rb @@ -10,13 +10,13 @@ module ActiveSupport def default_normalization_form ActiveSupport::Deprecation.warn( - "ActiveSupport::Multibyte::Unicode.default_normalization_form is deprecated and will be removed in Rails 6.2." + "ActiveSupport::Multibyte::Unicode.default_normalization_form is deprecated and will be removed in Rails 7.0." ) end def default_normalization_form=(_) ActiveSupport::Deprecation.warn( - "ActiveSupport::Multibyte::Unicode.default_normalization_form= is deprecated and will be removed in Rails 6.2." + "ActiveSupport::Multibyte::Unicode.default_normalization_form= is deprecated and will be removed in Rails 7.0." ) end diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 040ee2de2e..de5ce6c33d 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -87,7 +87,7 @@ module ActiveSupport if app.config.active_support.use_sha1_digests ActiveSupport::Deprecation.warn(<<-MSG.squish) config.active_support.use_sha1_digests is deprecated and will - be removed from Rails 6.2. Use + be removed from Rails 7.0. Use config.active_support.hash_digest_class = OpenSSL::Digest::SHA1 instead. MSG ActiveSupport::Digest.hash_digest_class = OpenSSL::Digest::SHA1 diff --git a/guides/source/6_2_release_notes.md b/guides/source/7_0_release_notes.md similarity index 95% rename from guides/source/6_2_release_notes.md rename to guides/source/7_0_release_notes.md index 728f6f88f7..cd8c015951 100644 --- a/guides/source/6_2_release_notes.md +++ b/guides/source/7_0_release_notes.md @@ -1,19 +1,21 @@ **DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.** -Ruby on Rails 6.2 Release Notes +Ruby on Rails 7.0 Release Notes =============================== -Highlights in Rails 6.2: +Highlights in Rails 7.0: + +* Ruby 2.7.0+ required, Ruby 3.0+ prefered -------------------------------------------------------------------------------- -Upgrading to Rails 6.2 +Upgrading to Rails 7.0 ---------------------- If you're upgrading an existing application, it's a great idea to have good test coverage before going in. You should also first upgrade to Rails 6.1 in case you haven't and make sure your application still runs as expected before attempting -an update to Rails 6.2. A list of things to watch out for when upgrading is +an update to Rails 7.0. A list of things to watch out for when upgrading is available in the [Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-6-2) guide. diff --git a/guides/source/_welcome.html.erb b/guides/source/_welcome.html.erb index 2f5c79e8aa..938144fee3 100644 --- a/guides/source/_welcome.html.erb +++ b/guides/source/_welcome.html.erb @@ -10,7 +10,7 @@

<% else %>

- These are the new guides for Rails 6.2 based on <%= @version %>. + These are the new guides for Rails 7.0 based on <%= @version %>. These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.

<% end %> diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 592e376e15..e9d06c5899 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -1047,7 +1047,7 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla `config.load_defaults` sets new defaults up to and including the version passed. Such that passing, say, `6.0` also gets the new defaults from every version before it. -#### For '6.2', defaults from previous versions below and: +#### For '7.0', defaults from previous versions below and: - `config.action_view.button_to_generates_button_tag`: `true` - `config.action_view.apply_stylesheet_media_default` : `false` - `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA256` diff --git a/guides/source/documents.yaml b/guides/source/documents.yaml index 527af2c3aa..f9e5a6aaf3 100644 --- a/guides/source/documents.yaml +++ b/guides/source/documents.yaml @@ -235,9 +235,9 @@ url: upgrading_ruby_on_rails.html description: This guide helps in upgrading applications to latest Ruby on Rails versions. - - name: Version 6.2 - ? - url: 6_2_release_notes.html - description: Release notes for Rails 6.2. + name: Version 7.0 - ? + url: 7_0_release_notes.html + description: Release notes for Rails 7.0. work_in_progress: true - name: Version 6.1 - December 2020 diff --git a/guides/source/maintenance_policy.md b/guides/source/maintenance_policy.md index 0b138d9fd6..269ac46236 100644 --- a/guides/source/maintenance_policy.md +++ b/guides/source/maintenance_policy.md @@ -44,7 +44,7 @@ from. In special situations, where someone from the Core Team agrees to support more series, they are included in the list of supported series. -**Currently included series:** `6.2.Z`. +**Currently included series:** `7.0.Z`. Security Issues --------------- @@ -59,7 +59,7 @@ be built from 1.2.2, and then added to the end of 1-2-stable. This means that security releases are easy to upgrade to if you're running the latest version of Rails. -**Currently included series:** `6.2.Z`, `6.1.Z`, `5.2.Z`. +**Currently included series:** `7.0.Z`, `6.1.Z`, `5.2.Z`. Severe Security Issues ---------------------- @@ -68,7 +68,7 @@ For severe security issues all releases in the current major series, and also th last release in the previous major series will receive patches and new versions. The classification of the security issue is judged by the core team. -**Currently included series:** `6.2.Z`, `6.1.Z`, `6.0.Z`, `5.2.Z`. +**Currently included series:** `7.0.Z`, `6.1.Z`, `6.0.Z`, `5.2.Z`. Unsupported Release Series -------------------------- diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index ecca80ed43..d132e86ca7 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -73,7 +73,7 @@ The new Rails version might have different configuration defaults than the previ To allow you to upgrade to new defaults one by one, the update task has created a file `config/initializers/new_framework_defaults.rb`. Once your application is ready to run with new defaults, you can remove this file and flip the `config.load_defaults` value. -Upgrading from Rails 6.1 to Rails 6.2 +Upgrading from Rails 6.1 to Rails 7.0 ------------------------------------- ### `ActionDispatch::Request#content_type` now returned Content-Type header as it is. diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 9d4e4028a2..fe840f89f0 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -199,7 +199,7 @@ module Rails end ActiveSupport.utc_to_local_returns_utc_offset_times = true - when "6.2" + when "7.0" load_defaults "6.1" if respond_to?(:action_dispatch) diff --git a/railties/lib/rails/gem_version.rb b/railties/lib/rails/gem_version.rb index d216dd24b5..392d141ea1 100644 --- a/railties/lib/rails/gem_version.rb +++ b/railties/lib/rails/gem_version.rb @@ -7,8 +7,8 @@ module Rails end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha" diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_2.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt similarity index 95% rename from railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_2.rb.tt rename to railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt index 58c987fe25..db2e4ce190 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_2.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. # -# This file contains migration options to ease your Rails 6.2 upgrade. +# This file contains migration options to ease your Rails 7.0 upgrade. # # Once upgraded flip defaults one by one to migrate to the new default. # diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index 9baf6d4c76..935613e84c 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -489,7 +489,7 @@ module ApplicationTests test "db:structure:#{command} is deprecated" do add_to_config("config.active_support.deprecation = :stderr") stderr_output = capture(:stderr) { rails("db:structure:#{command}", stderr: true, allow_failure: true) } - assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}` is deprecated and will be removed in Rails 6.2/, stderr_output) + assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}` is deprecated and will be removed in Rails 7.0/, stderr_output) end end @@ -606,7 +606,7 @@ module ApplicationTests test "db:test:load_structure is deprecated" do add_to_config("config.active_support.deprecation = :stderr") stderr_output = capture(:stderr) { rails("db:test:load_structure", stderr: true, allow_failure: true) } - assert_match(/DEPRECATION WARNING: Using `bin\/rails db:test:load_structure` is deprecated and will be removed in Rails 6.2/, stderr_output) + assert_match(/DEPRECATION WARNING: Using `bin\/rails db:test:load_structure` is deprecated and will be removed in Rails 7.0/, stderr_output) end test "db:setup loads schema and seeds database" do diff --git a/railties/test/application/rake/multi_dbs_test.rb b/railties/test/application/rake/multi_dbs_test.rb index 1e485f623a..ad16f413be 100644 --- a/railties/test/application/rake/multi_dbs_test.rb +++ b/railties/test/application/rake/multi_dbs_test.rb @@ -476,7 +476,7 @@ module ApplicationTests add_to_config("config.active_support.deprecation = :stderr") stderr_output = capture(:stderr) { rails("db:structure:#{command}:animals", stderr: true, allow_failure: true) } - assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}:animals` is deprecated and will be removed in Rails 6.2/, stderr_output) + assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}:animals` is deprecated and will be removed in Rails 7.0/, stderr_output) end end diff --git a/version.rb b/version.rb index d216dd24b5..392d141ea1 100644 --- a/version.rb +++ b/version.rb @@ -7,8 +7,8 @@ module Rails end module VERSION - MAJOR = 6 - MINOR = 2 + MAJOR = 7 + MINOR = 0 TINY = 0 PRE = "alpha"