5.0 Upgrade Guide
>= 2.4 only
We've dropped support for MRI < 2.4, which obviously means that the prerequisite is to upgrade your Ruby, if you're on < 2.4.
rom-mapper is gone. If you have it in your
Gemfile, simply remove it.
If you happen to require
rom-mapper manually, simply do:
# 4.x require 'rom-mapper' # 5.x require 'rom/mapper'
Repository#aggregate is gone
If you use
Repository#aggregate change it to
# 4.x class UserRepo < ROM::Repository[:users] def get(id) aggregate(:account).by_pk(id).one end end # 5.x class UserRepo < ROM::Repository[:users] def get(id) users.combine(:account).by_pk(id).one end end
Setting attribute aliases is no longer part of type meta
Information about aliases is now stored within the attribute object itself. To upgrade:
# 4.x attribute :username, Types::String.meta(alias: :name) # 5.x attribute :username, Types::String, alias: :name
Types::Int renamed to
All occurences of
Types::Int must be renamed to
Please go through the changelogs too: