Skip to content

Commit e38dfb2

Browse files
committed
Remove deprecated Rails.config.enable_dependency_loading
1 parent 0c76f17 commit e38dfb2

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

guides/source/7_2_release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Please refer to the [Changelog][railties] for detailed changes.
3030

3131
* Remove deprecated `Rails.application.secrets`.
3232

33+
* Remove deprecated `Rails.config.enable_dependency_loading`.
34+
3335
### Deprecations
3436

3537
### Notable changes

railties/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `Rails.config.enable_dependency_loading`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `Rails.application.secrets`.
26

37
*Rafael Mendonça França*

railties/lib/rails/application/configuration.rb

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def initialize(*)
6767
@api_only = false
6868
@debug_exception_response_format = nil
6969
@x = Custom.new
70-
@enable_dependency_loading = false
7170
@content_security_policy = nil
7271
@content_security_policy_report_only = false
7372
@content_security_policy_nonce_generator = nil
@@ -350,22 +349,6 @@ def enable_reloading=(value)
350349
self.cache_classes = !value
351350
end
352351

353-
ENABLE_DEPENDENCY_LOADING_WARNING = <<~MSG
354-
This flag addressed a limitation of the `classic` autoloader and has no effect nowadays.
355-
To fix this deprecation, please just delete the reference.
356-
MSG
357-
private_constant :ENABLE_DEPENDENCY_LOADING_WARNING
358-
359-
def enable_dependency_loading
360-
Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
361-
@enable_dependency_loading
362-
end
363-
364-
def enable_dependency_loading=(value)
365-
Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
366-
@enable_dependency_loading = value
367-
end
368-
369352
def read_encrypted_secrets
370353
Rails.deprecator.warn(`config.read_encrypted_secrets is deprecated and will be removed in Rails 7.3.`)
371354
end

railties/test/application/configuration_test.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,13 +1452,6 @@ def index
14521452
assert_equal false, ActionView::Resolver.caching?
14531453
end
14541454

1455-
test "config.enable_dependency_loading is deprecated" do
1456-
app "development"
1457-
1458-
assert_deprecated(Rails.deprecator) { Rails.application.config.enable_dependency_loading }
1459-
assert_deprecated(Rails.deprecator) { Rails.application.config.enable_dependency_loading = true }
1460-
end
1461-
14621455
test "ActionController::Base::renderer uses Rails.application.default_url_options and config.force_ssl" do
14631456
add_to_config <<~RUBY
14641457
config.force_ssl = true

0 commit comments

Comments
 (0)