Skip to content

Commit 9489c14

Browse files
committed
Remove deprecated #all_connection_pools
1 parent 7ddf423 commit 9489c14

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

activerecord/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Remove deprecated `#all_connection_pools`.
2+
3+
*Rafael Mendonça França*
4+
15
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
26

37
*Rafael Mendonça França*

activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,6 @@ def connection_pool_names # :nodoc:
8888
connection_name_to_pool_manager.keys
8989
end
9090

91-
def all_connection_pools
92-
ActiveRecord.deprecator.warn(<<-MSG.squish)
93-
The `all_connection_pools` method is deprecated in favor of `connection_pool_list`.
94-
Call `connection_pool_list(:all)` to get the same behavior as `all_connection_pools`.
95-
MSG
96-
connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) }
97-
end
98-
9991
# Returns the pools for a connection handler and given role. If +:all+ is passed,
10092
# all pools belonging to the connection handler will be returned.
10193
def connection_pool_list(role = nil)

activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,6 @@ def test_connection_pool_list
328328
end
329329
end
330330

331-
def test_all_connection_pools
332-
assert_deprecated(ActiveRecord.deprecator) do
333-
assert_equal([@rw_pool, @ro_pool], @handler.all_connection_pools)
334-
end
335-
end
336-
337331
def test_retrieve_connection
338332
assert @handler.retrieve_connection(@connection_name)
339333
assert @handler.retrieve_connection(@connection_name, role: :reading)

guides/source/7_2_release_notes.md

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

149149
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
150150

151+
* Remove deprecated `#all_connection_pools`.
152+
151153
### Deprecations
152154

153155
* Deprecate `Rails.application.config.active_record.allow_deprecated_singular_associations_name`

0 commit comments

Comments
 (0)