ActiveRecord.deprecator.warn(<<~MSG)
Passing the coder as positional argument is deprecated and will be removed in Rails 7.2.
Please pass the coder as a keyword argument:
serialize #{attr_name.inspect}, coder: #{class_name_or_coder}
MSG
coder = class_name_or_coder
This writing style will be deprecated in 7.1 and will not be available in 7.2.
FYI: https://github.com/rails/rails/blob/bd4996bdfddb3d9c74ec5e91674f9b0c6e1693dc/activerecord/lib/active_record/attribute_methods/serialization.rb#L186C1-L193C42
These are the results of local testing.