Skip to content

Commit c67797d

Browse files
committed
Support Rails 7.1 and 7.2
The gemspec required Rails 8.0 from the first release, so applications on the two prior Rails lines could not add the gem at all. Measuring the suite against those lines shows the floor was higher than the code needs. On Rails 7.1 and 7.2 the suite fails one test, and that test asserts a Rails 8 error class rather than a behaviour: Rails 8 maps an exhausted SQLite busy handler to StatementTimeout, and 7.1 and 7.2 leave it as the StatementInvalid that timeout subclasses. The message the caller relies on is identical, so the assertion moves to the parent class and keeps the message match. The bundled migrations declared ActiveRecord::Migration[8.0], which raises Unknown migration version on 7.x. They now declare [7.1]. Under Rails 8 the compatibility layer between the two only changes remove_foreign_key, and no Solid Objects migration calls it, so an install built at [7.1] gets the same schema as one built at [8.0]. Rails 7.0 stays out of range. Its SQLite adapter requires sqlite3 ~> 1.4, and the busy-handler control this gem depends on arrived in sqlite3 2.x, so the two cannot be loaded together. The compatibility matrix now runs Ruby 3.3, 3.4, and 4.0 against Rails 7.1, 7.2, 8.0, and 8.1. That job runs SQLite only, so adapter behaviour on the older lines is unmeasured against PostgreSQL and MySQL, and the roadmap says so.
1 parent fc3a8f8 commit c67797d

12 files changed

Lines changed: 37 additions & 22 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
ruby-version: [ "3.3", "3.4", "4.0" ]
37-
rails-version: [ "8.0", "8.1" ]
37+
rails-version: [ "7.1", "7.2", "8.0", "8.1" ]
3838
env:
3939
RAILS_VERSION: ${{ matrix.rails-version }}
4040
steps:

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use dedicated, empty databases for adapter tests and benchmarks.
1616

1717
## Coding Style & Naming Conventions
1818

19-
Target Ruby 3.3+ and Rails 8+. Use two-space indentation and let Standard Ruby plus the Solid Queue-derived RuboCop policy decide formatting. Prefer descriptive `snake_case` methods and variables, `CamelCase` constants, early returns, and keyword shorthand such as `Message.new(actor_id:)`. Avoid boolean parameters and abbreviations.
19+
Target Ruby 3.3+ and Rails 7.1+. Use two-space indentation and let Standard Ruby plus the Solid Queue-derived RuboCop policy decide formatting. Prefer descriptive `snake_case` methods and variables, `CamelCase` constants, early returns, and keyword shorthand such as `Message.new(actor_id:)`. Avoid boolean parameters and abbreviations.
2020

2121
Every owned Ruby file must enable inline RBS with `# rbs_inline: enabled`; annotate methods and instance variables using `# @rbs`. Keep database behavior portable across SQLite, PostgreSQL, and MySQL. Model queue state through table membership rather than partial indexes.
2222

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
`config/initializers` no longer loses them.
1111
- Apply the configured `connects_to` in the record class body, so the
1212
connection follows the class through a development reload.
13+
- Lower the supported Rails floor from 8.0 to 7.1. The gem dependencies, the
14+
bundled migrations, and the compatibility CI matrix now cover Rails 7.1, 7.2,
15+
8.0, and 8.1. The migrations declare `ActiveRecord::Migration[7.1]`, which
16+
builds the same schema as `[8.0]` because the compatibility layer between the
17+
two only changes `remove_foreign_key`, which no Solid Objects migration calls.
18+
Rails 7.0 stays out of range: its SQLite adapter requires `sqlite3 ~> 1.4`,
19+
and the busy-handler control this gem needs arrived in `sqlite3` 2.x.
1320

1421
## 0.13.2 - 2026-08-17
1522

Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ PATH
22
remote: .
33
specs:
44
solid_objects (0.13.3)
5-
actioncable (>= 8.0)
6-
actionpack (>= 8.0)
7-
actionview (>= 8.0)
8-
activerecord (>= 8.0)
9-
activesupport (>= 8.0)
5+
actioncable (>= 7.1)
6+
actionpack (>= 7.1)
7+
actionview (>= 7.1)
8+
activerecord (>= 7.1)
9+
activesupport (>= 7.1)
1010
rack (>= 3.1)
11-
railties (>= 8.0)
11+
railties (>= 7.1)
1212
thor (>= 1.3)
1313

1414
GEM

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ mount SolidObjects::Engine => "/solid_objects"
341341

342342
## Installation
343343

344-
Solid Objects requires Ruby 3.3 or newer and Rails 8.0 or newer.
344+
Solid Objects requires Ruby 3.3 or newer and Rails 7.1 or newer. CI runs the
345+
suite against Rails 7.1, 7.2, 8.0, and 8.1.
345346

346347
Add the gem, install its initializer and migration, then migrate:
347348

db/migrate/20260805000000_create_solid_objects_tables.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rbs_inline: enabled
22

3-
class CreateSolidObjectsTables < ActiveRecord::Migration[8.0]
3+
class CreateSolidObjectsTables < ActiveRecord::Migration[7.1]
44
# @rbs () -> void
55
def change
66
create_processes

db/migrate/20260806000000_add_state_revision_to_solid_objects_instances.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rbs_inline: enabled
22

3-
class AddStateRevisionToSolidObjectsInstances < ActiveRecord::Migration[8.0]
3+
class AddStateRevisionToSolidObjectsInstances < ActiveRecord::Migration[7.1]
44
# @rbs () -> void
55
def change
66
add_column SolidObjects.table_name(:instances),

db/migrate/20260813000000_rename_message_dispatch_columns.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rbs_inline: enabled
22

3-
class RenameMessageDispatchColumns < ActiveRecord::Migration[8.0]
3+
class RenameMessageDispatchColumns < ActiveRecord::Migration[7.1]
44
# @rbs () -> void
55
def up
66
remove_check_constraint messages_table, name: "chk_so_messages_kind"

docs/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Requirements
44

55
- Ruby 3.3 or newer
6-
- Rails 8.0 or newer
6+
- Rails 7.1 or newer
77
- SQLite 3.35+, PostgreSQL 14+, and MySQL 8.0/InnoDB for the full matrix
88

99
Install dependencies:

docs/roadmap.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@
6666
- Inline RBS generation/validation, Steep, Standard Ruby, Solid Queue's exact
6767
RuboCop policy, and a warning-free Brakeman scan
6868
- Compatibility CI across the supported span: Ruby 3.3, 3.4, and 4.0 against
69-
Rails 8.0 and 8.1, pinned through `RAILS_VERSION` so the advertised range is
70-
verified rather than assumed
69+
Rails 7.1, 7.2, 8.0, and 8.1, pinned through `RAILS_VERSION` so the advertised
70+
range is verified rather than assumed. The compatibility job runs SQLite only;
71+
the PostgreSQL and MySQL jobs run on the newest Rails, so adapter behavior on
72+
Rails 7.1 and 7.2 is unmeasured against those servers. Rails 7.0 is out of
73+
range because its SQLite adapter requires `sqlite3 ~> 1.4`, and this gem needs
74+
the busy-handler control that arrived in `sqlite3` 2.x
7175
- A JavaScript suite covering every browser module, run in CI with Node's test
7276
runner and jsdom, plus a browser suite running the same modules against real
7377
Chromium and a real Turbo build, with every GitHub Actions reference pinned to

0 commit comments

Comments
 (0)