Skip to content

Remove what 3.7.0 deprecated (4.0.0) - #48

Merged
schlick merged 10 commits into
developfrom
release/4.0.0
Sep 21, 2026
Merged

schlick merged 10 commits into
developfrom
release/4.0.0

Conversation

@schlick

@schlick schlick commented Sep 17, 2026

Copy link
Copy Markdown
Member

Removes everything 3.7.0 deprecated. Nothing here is a surprise for anyone who
upgraded to 3.7.0 and cleared its warnings — every breaking change below was
announced a release ahead, which was the whole point of spending a minor on it.

Breaking

Change What a consumer does
Ruby 3.2 and Rails 7.2 are the minimum Upgrade, or stay on 3.7.x
slack-notifier is no longer a dependency Add gem 'slack-notifier' if you set config.use_slack
The Capistrano task is gone Invoke bundle exec rake patches:run from your deployment process
The workers include Sidekiq::Job Use Sidekiq 6.3+, i.e. a supported 7.x or 8.x

Two smaller ones, both consequences of the above:

  • Rails is required rather than guarded for. railties and activerecord
    were always hard dependencies and the gem ships an engine, so the
    defined?(Rails) checks described a mode nobody used — one of them read
    defined?(:Rails), always truthy, and went unnoticed until 3.6.3.
    lib/patches.rb now requires rails, because loading the engine without it
    fails on delegate_missing_to.
  • The install migration declares ActiveRecord::Migration[7.2]. Not
    cosmetic: [5.0] compatibility produced datetime timestamp columns, [7.2]
    produces datetime(6), matching a modern Rails schema. Fresh installs only —
    existing tables are untouched, since consumers ran their own copy of the file
    long ago.

Patches.deprecator stays, with its horizon moved to the next major.
Applications were told to configure it to silence 3.7.0's warnings, so removing
it would break their initializers unannounced.

Nothing else changed: patch classes, Patches::Base, the generator, the rake
tasks, the configuration and the patches_patches table are all as they were.

Verification

CI covers every combination the gemspec allows — 12 cells, Ruby 3.2–4.0 against
Rails 7.2–8.1 — which is new: before 4.0 the matrix and the floors were
different sets. Plus a leg for each optional-integration state, including one
nothing covered before:

Leg Examples
Sidekiq 7.x / 8.x, strict arguments on and off 66
Sidekiq absent 51
slack-notifier absent 64
Neither installed 49

All 19 configurations pass locally as well.

Reviewing

Nine commits, one idea each, with Release 4.0.0 last. The changelog heading
reads ## [4.0.0] - unreleased deliberately — RELEASING.md step 2 now says to
replace that with the date on release day, because 3.7.0 shipped a week after
its entry was drafted and carried the drafting date until someone noticed. That
correction is in here too.

🤖 Generated with Claude Code

The versions 3.7.0 announced. CI now covers every combination the gemspec
allows rather than a wider range, so the two are the same set.
Deprecated in 3.7.0. docs/usage.md now documents invoking rake patches:run
from the deployment process, keeping the Sidekiq restart caveat.
Deprecated in 3.7.0. Patches::Notifier requires it inside a begin/rescue,
so the defined?(Slack) guard it always had now does something. Slack-dependent
specs move under spec/slack/ so the suite runs without the gem, mirroring
Sidekiq.
Deprecated in 3.7.0. Sidekiq has provided the constant since 6.3, so the
Patches.sidekiq_job_module shim and its Sidekiq::Worker fallback go.
The gemspec floors enforce what the warning announced. Patches.deprecator
stays - applications were told to configure it to silence 3.7.0's warnings -
now pointing at the next major.
The optional axis tested each gem absent but never both, which is the
common case for a plain Rails app. Also fixes the exclude logic:
--exclude-pattern does not accumulate, so the patterns must be one
comma-separated value.
railties and activerecord are hard dependencies, and the engine, the install
migration and default_path all assume a Rails application, so the
defined?(Rails) guards described a mode nobody used. One of them read
defined?(:Rails) - always truthy - and went unnoticed until 3.6.3, which is
proof enough that the path was never exercised.

lib/patches.rb now requires rails explicitly: requiring the engine without it
fails, because railties expects ActiveSupport's core extensions to be loaded
first. Sidekiq and slack-notifier stay conditional - those are genuinely
optional.
It said [5.0], which the Rails floor now makes inconsistent. Not only
cosmetic: under [5.0] compatibility a fresh table gets datetime columns
without precision, where [7.2] gets datetime(6), matching what a modern
Rails app's own schema uses. Existing installs are untouched - they ran
their own copy of this file long ago.

A spec asserts the declared release is no older than the railties floor, so
the two cannot drift apart again.
The heading carries `unreleased` until the day it ships; RELEASING.md step 2
now says to replace it with the date then. 3.7.0's entry is corrected to
2026-09-17, the day it merged and published, rather than 2026-09-10 when it
was drafted.
@sonarqube-rdytech

Copy link
Copy Markdown

@schlick
schlick merged commit 6a6f9e5 into develop Sep 21, 2026
24 checks passed
@schlick
schlick deleted the release/4.0.0 branch September 21, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants