Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruby to 3.0 #8452

Merged
merged 44 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a97c76b
Update the github deps to ruby 3.0.2
alecslupu Oct 24, 2021
de3f486
Fixing some of the decidim core specs
alecslupu Oct 25, 2021
7731f6c
Fixing Templates specs
alecslupu Oct 25, 2021
5ae39b4
Fixing some of the Decidim Verifications errors
alecslupu Oct 25, 2021
6f94411
Fix Assemblies permission related errors
alecslupu Oct 25, 2021
4a58876
Fixing premissions related specs
alecslupu Oct 25, 2021
eb81367
fix Rectify Command
alecslupu Oct 25, 2021
a12d85b
Fixing decidim-admin issues
alecslupu Oct 25, 2021
c73ce96
Display brakeman version
alecslupu Oct 25, 2021
c3c9ef5
Fix the Presenters
alecslupu Oct 25, 2021
31e5d42
Updating rspec-cells
alecslupu Oct 26, 2021
7db9ef6
Fix the publish event specs
alecslupu Oct 26, 2021
9bcecd7
fix subscribers
alecslupu Oct 26, 2021
7a1d205
Fixing Core specs
alecslupu Oct 26, 2021
3f5bf3d
Fix Participatory process
alecslupu Oct 26, 2021
f34a5ea
Fixing Accountability failing specs
alecslupu Oct 26, 2021
d356763
fix admin failing specs
alecslupu Oct 26, 2021
1ea515b
Bulk fixing failing tests related to events, linting
alecslupu Oct 27, 2021
781b5d0
Fixing Decidim-Initiatives failing specs
alecslupu Jan 2, 2022
b15791e
Fixing Decidim elections failing specs
alecslupu Jan 2, 2022
4d6dbd2
Running linters
alecslupu Jan 2, 2022
07483a2
Fixing last election failing spec
alecslupu Jan 2, 2022
754f32a
Refactor Ruby 3.0.2 actions
alecslupu Jan 4, 2022
b97fb17
Upgrade brakeman
alecslupu Jan 4, 2022
837856f
Rails attributes compatibility
alecslupu Jan 18, 2022
489dc64
Fixing Rails::Engine parameters
alecslupu Mar 13, 2022
1b67a5a
Patch WorkflowManifest Rails::Engine attribute
alecslupu Mar 13, 2022
c166a09
Change the ruby-version
alecslupu Mar 14, 2022
0f9565a
Locking Gemspec ruby version
alecslupu Mar 14, 2022
dfdc540
Fixing failing specs
alecslupu Mar 14, 2022
41c64df
Fixing latest failing tests
alecslupu Mar 14, 2022
5f188d8
Update file_validators to support Ruby 3
alecslupu Mar 22, 2022
54a40df
Remove Rectify Overrides as they are not required anymore
alecslupu Mar 22, 2022
de2c6e9
Update date_validators to support Ruby 3
alecslupu Mar 22, 2022
0091db0
Add RUBY_VERSION to all the ci pipelines
alecslupu Mar 22, 2022
ed216ed
Upgrade election dependencies
alecslupu Apr 11, 2022
d73a526
Fixing Command class
alecslupu Apr 19, 2022
3ea517b
Fix last failing specs
alecslupu Apr 19, 2022
7f70d03
Fixing Menu move method
alecslupu Apr 21, 2022
121030c
Update the changelog
alecslupu Apr 21, 2022
5180ebc
Merge branch 'develop' of github.com:decidim/decidim into ruby-3.0
alecslupu May 2, 2022
588460a
Set the generator to use Decidim Official repo
alecslupu May 2, 2022
64ddbf5
Merge branch 'develop' of github.com:decidim/decidim into ruby-3.0
alecslupu May 3, 2022
b27dc7e
Running linters
alecslupu May 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/module-rspec/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
required: true
ruby_version:
description: 'Ruby Version'
default: "2.7.5"
default: "3.0.2"
required: false
node_version:
description: 'Node version'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_accountability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-accountability
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-admin
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_admin_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-admin
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
alecslupu marked this conversation as resolved.
Show resolved Hide resolved
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-api
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_assemblies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-assemblies
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_blogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-blogs
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_budgets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-budgets
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-comments
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_conferences.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-conferences
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_consultations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-consultations
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_core_lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-core
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_core_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-core
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_core_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-core
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_debates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-debates
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_dev_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-dev
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_elections_system_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_elections_system_public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_elections_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-elections
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_forms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-forms
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-generators
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_initiatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_initiatives_system_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_initiatives_system_public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-initiatives
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_meetings_system_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_meetings_system_public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_meetings_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-meetings
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-pages
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_participatory_processes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-participatory_processes
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_performance_metrics_monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
env:
CI: "true"
SIMPLECOV: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
RAILS_ENV: development

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_proposals_system_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_proposals_system_public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_proposals_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-proposals
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_sortitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-sortitions
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_surveys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-surveys
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-system
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-templates
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_verifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
CI: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1
DECIDIM_MODULE: decidim-verifications
PARALLEL_TEST_PROCESSORS: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CI: "true"
SIMPLECOV: "true"
RUBY_VERSION: 2.7.5
RUBY_VERSION: 3.0.2
NODE_VERSION: 16.9.1

jobs:
Expand Down
3 changes: 2 additions & 1 deletion .rubocop_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ AllCops:
- "decidim_app-design/node_modules/**/*"
- "spec/decidim_dummy_app/**/*"
- "node_modules/**/*"
- "decidim-initiatives/lib/gem_overrides/origami/date.rb"
# Default formatter will be used if no -f/--format option is given.
DefaultFormatter: progress
# Cop names are not displayed in offense messages by default. Change behavior
Expand Down Expand Up @@ -68,7 +69,7 @@ AllCops:
# If a value is specified for TargetRubyVersion then it is used.
# Else if .ruby-version exists and it contains an MRI version it is used.
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

# RSpec:
# Patterns:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
3.0.2
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ In the next version (v0.28.0) it will be fully removed from the database.

### Added

#### Upgrade to Ruby 3.0

PR [\#8452] https://github.com/decidim/decidim/pull/8452 has upgraded the required ruby version to 3.0. Upgrading to this version will require either to install the Ruby Version on your host, or change the decidim docker image to use ruby:3.0.2.

#### Rails Upgrade to 6.1
PR [\#8411] https://github.com/decidim/decidim/pull/8411 changes the following:

Expand Down Expand Up @@ -121,7 +125,7 @@ There are specific things that you need to change regarding your Form or `Virtus
- When calling the `attributes` method of the model/form classes, use strings to refer to the attribute names, not symbols as you might have done with `Virtus` or `Rectify::Form`. Change all `model.attributes[:attr_name]` method calls to `model.attributes["attr_name"]`.
andreslucena marked this conversation as resolved.
Show resolved Hide resolved
- When calling `model.attributes.slice(...)`, you also need to use strings to refer to the attribute keys. Change all instances of `model.attributes.slice(:attr1, :attr2)` to `model.attributes.slice("attr1", "attr2")`
- If you had overridden any of the [`Rectify::Form` methods](https://github.com/andypike/rectify/blob/v0.13.0/lib/rectify/form.rb) within your form classes, remove those overrides. For example, you might have overridden the `form_attributes_valid?` method which no longer does anything. Instead, define a custom validation in order to add extra validations to your forms.
- Very rarely, when defining a an attribute of type `Rails::Engine`, you need to change `attribute :attr_name, Rails::Engine` to `attribute :attr_name, Rails::Engine, {}`. This is because we want to preserve the method signature against `ActiveModel::Attributes` for the `attribute` class method intead of the legacy `Virtus.model`. There is a limitation in the Ruby language that if the method has default values for the previous arguments and defines keyword arguments, the last argument will always receive a `respond_to?(:to_hash)` call to it which doesn't work for `Rails::Engine` (you can try it out in the Rails console by calling `Rails::Engine.respond_to?(:to_hash)`).
- Very rarely, when defining a an attribute of type `Rails::Engine`, you need to change `attribute :attr_name, Rails::Engine` to `attribute :attr_name, Rails::Engine, **{}`. This is because we want to preserve the method signature against `ActiveModel::Attributes` for the `attribute` class method intead of the legacy `Virtus.model`. There is a limitation in the Ruby language that if the method has default values for the previous arguments and defines keyword arguments, the last argument will always receive a `respond_to?(:to_hash)` call to it which doesn't work for `Rails::Engine` (you can try it out in the Rails console by calling `Rails::Engine.respond_to?(:to_hash)`).
- Test all your form and command classes thoroughly to notice any differences between the two implementations. The new layer is a bit more "robust" with some of the type castings, so some things may break during the migration in case you have relied on some of the oversights within `Virtus`.

#### Custom icons new uploader
Expand Down