mirror of https://github.com/rails/rails
Remove deprecated `#all_connection_pools`
This commit is contained in:
parent
7ddf423329
commit
9489c14b7b
|
@ -1,3 +1,7 @@
|
|||
* Remove deprecated `#all_connection_pools`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
|
|
@ -88,14 +88,6 @@ module ActiveRecord
|
|||
connection_name_to_pool_manager.keys
|
||||
end
|
||||
|
||||
def all_connection_pools
|
||||
ActiveRecord.deprecator.warn(<<-MSG.squish)
|
||||
The `all_connection_pools` method is deprecated in favor of `connection_pool_list`.
|
||||
Call `connection_pool_list(:all)` to get the same behavior as `all_connection_pools`.
|
||||
MSG
|
||||
connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) }
|
||||
end
|
||||
|
||||
# Returns the pools for a connection handler and given role. If +:all+ is passed,
|
||||
# all pools belonging to the connection handler will be returned.
|
||||
def connection_pool_list(role = nil)
|
||||
|
|
|
@ -328,12 +328,6 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
def test_all_connection_pools
|
||||
assert_deprecated(ActiveRecord.deprecator) do
|
||||
assert_equal([@rw_pool, @ro_pool], @handler.all_connection_pools)
|
||||
end
|
||||
end
|
||||
|
||||
def test_retrieve_connection
|
||||
assert @handler.retrieve_connection(@connection_name)
|
||||
assert @handler.retrieve_connection(@connection_name, role: :reading)
|
||||
|
|
|
@ -148,6 +148,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
|
|||
|
||||
* Remove deprecated `ActiveRecord::ConnectionAdapters::SchemaCache#data_sources`.
|
||||
|
||||
* Remove deprecated `#all_connection_pools`.
|
||||
|
||||
### Deprecations
|
||||
|
||||
* Deprecate `Rails.application.config.active_record.allow_deprecated_singular_associations_name`
|
||||
|
|
Loading…
Reference in New Issue