You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rails-upgrade/detection-scripts/patterns/rails-51-patterns.yml covers the removals that landed at Rails 5.1 (e.g. *_filter, redirect_to :back, render :text, use_transactional_fixtures) — all 13 entries are correctly classified breaking after the kind rollout in #59.
The file does not cover the new deprecations introduced at 5.1. Surfacing those is the right place to flag them: each one is the upstream warning that becomes a removal in a later version's patterns file. Without 5.1 deprecation entries, an app upgrading 5.0 → 5.1 has no early-warning hooks for things like ActionDispatch::ParamsParser::ParseError, Duration implicit coercion, or :quoted_id overrides — all of which start warning at 5.1 and bite later.
The same scoping bias may exist in other version files; this issue narrows scope to 5.1 specifically. Other versions can get sibling issues if confirmed.
Proposed entries (kind: deprecation)
Sourced from rails/rails v5.1.0 CHANGELOGs across actionpack, activerecord, activesupport, railties.
High-impact (typical apps)
ActionDispatch::ParamsParser::ParseError → use ActionDispatch::Http::Parameters::ParseError. (actionpack/CHANGELOG.md)
ActiveSupport::Duration implicit coercion to seconds in arithmetic with Numeric. (activesupport/CHANGELOG.md)
String :if / :unless conditions on set_callback / skip_callback. (activesupport/CHANGELOG.md.) Note: model-callback variant is already in rails-52-patterns.yml as CALLBACK_STRING_CONDITIONS; this is the lower-level set_callback deprecation that warns from 5.1.
ActiveSupport.halt_callback_chains_on_return_false — deprecated in 5.1, removed in 5.2. (activesupport/CHANGELOG.md.) The 5.2 removal is already in rails-52-patterns.yml (HALT_CALLBACK_CHAINS_ON_RETURN_FALSE, kind: breaking after PR Classify kind: for rails-52-patterns.yml (#60) #77's flip); the 5.1 deprecation warning is missing here.
config.action_controller.raise_on_unfiltered_parameters — already a no-op at 5.1, deprecated formally. (actionpack/CHANGELOG.md.)
AR-specific (apps that touch internals)
#quoted_id in quoting — deprecated 5.1, removed 5.2. (activerecord/CHANGELOG.md.) The 5.2 removal is in rails-52-patterns.yml (QUOTED_ID_METHOD, kind: breaking); the 5.1 deprecation warning is missing.
Locking records with unpersisted changes (#lock! on dirty record) — deprecated 5.1, raises in 5.2. (activerecord/CHANGELOG.md.) The 5.2 break is in rails-52-patterns.yml (LOCK_BANG_UNPERSISTED, kind: breaking); the 5.1 deprecation warning is missing.
The original bulk import scoped each rails-XY-patterns.yml to "things that change at this hop's removal cycle" rather than "things the user should know about at this hop, including new deprecations". Adding deprecation entries at the version where the warning is introduced lets the detection workflow give earlier signal — users see kind: deprecation at 5.1 instead of being surprised by kind: breaking at 5.2.
Out of scope
Other version files (5.0, 5.2, 6.0, 6.1, 7.0, 7.1, 7.2, 8.0, 8.1) — likely have the same gap. Consider sibling issues if confirmed.
Reclassifying or modifying any existing entry in rails-51-patterns.yml.
Source-level deprecation sites in rails/rails v5.1.0:
actionpack/CHANGELOG.md
activerecord/CHANGELOG.md
activesupport/CHANGELOG.md
For each entry, the corresponding ActiveSupport::Deprecation.warn lives in the relevant lib/ file; the warning text in source is usually a more reliable detection target than the CHANGELOG line.
Problem
rails-upgrade/detection-scripts/patterns/rails-51-patterns.ymlcovers the removals that landed at Rails 5.1 (e.g.*_filter,redirect_to :back,render :text,use_transactional_fixtures) — all 13 entries are correctly classifiedbreakingafter the kind rollout in #59.The file does not cover the new deprecations introduced at 5.1. Surfacing those is the right place to flag them: each one is the upstream warning that becomes a removal in a later version's patterns file. Without 5.1 deprecation entries, an app upgrading 5.0 → 5.1 has no early-warning hooks for things like
ActionDispatch::ParamsParser::ParseError,Durationimplicit coercion, or:quoted_idoverrides — all of which start warning at 5.1 and bite later.The same scoping bias may exist in other version files; this issue narrows scope to 5.1 specifically. Other versions can get sibling issues if confirmed.
Proposed entries (kind: deprecation)
Sourced from
rails/railsv5.1.0 CHANGELOGs across actionpack, activerecord, activesupport, railties.High-impact (typical apps)
ActionDispatch::ParamsParser::ParseError→ useActionDispatch::Http::Parameters::ParseError. (actionpack/CHANGELOG.md)ActiveSupport::Durationimplicit coercion to seconds in arithmetic withNumeric. (activesupport/CHANGELOG.md):if/:unlessconditions onset_callback/skip_callback. (activesupport/CHANGELOG.md.) Note: model-callback variant is already inrails-52-patterns.ymlasCALLBACK_STRING_CONDITIONS; this is the lower-levelset_callbackdeprecation that warns from 5.1.ActiveSupport.halt_callback_chains_on_return_false— deprecated in 5.1, removed in 5.2. (activesupport/CHANGELOG.md.) The 5.2 removal is already inrails-52-patterns.yml(HALT_CALLBACK_CHAINS_ON_RETURN_FALSE,kind: breakingafter PR Classify kind: for rails-52-patterns.yml (#60) #77's flip); the 5.1 deprecation warning is missing here.config.action_controller.raise_on_unfiltered_parameters— already a no-op at 5.1, deprecated formally. (actionpack/CHANGELOG.md.)AR-specific (apps that touch internals)
#quoted_idin quoting — deprecated 5.1, removed 5.2. (activerecord/CHANGELOG.md.) The 5.2 removal is inrails-52-patterns.yml(QUOTED_ID_METHOD,kind: breaking); the 5.1 deprecation warning is missing.#lock!on dirty record) — deprecated 5.1, raises in 5.2. (activerecord/CHANGELOG.md.) The 5.2 break is inrails-52-patterns.yml(LOCK_BANG_UNPERSISTED,kind: breaking); the 5.1 deprecation warning is missing.Migrator.schema_migrations_table_name(activerecord)supports_migrations?on connection adapters (activerecord; gem-targeted)supports_primary_key?on connection adapters (activerecord; gem-targeted)ColumnDumper#migration_keys(activerecord; gem-targeted):defaultarg toindex_name_exists?(activerecord)Per-entry shape
Each new entry follows the existing schema in
rails-51-patterns.yml:Test plan
ActiveSupport::Deprecation.warncallbin/validate-patterns rails-upgrade/detection-scripts/patterns/rails-51-patterns.ymlpassesbin/validate-patterns(all files) passesRationale for the gap
The original bulk import scoped each
rails-XY-patterns.ymlto "things that change at this hop's removal cycle" rather than "things the user should know about at this hop, including new deprecations". Adding deprecation entries at the version where the warning is introduced lets the detection workflow give earlier signal — users seekind: deprecationat 5.1 instead of being surprised bykind: breakingat 5.2.Out of scope
rails-51-patterns.yml.breaking_changes:key — that's tracked in Rename breaking_changes: → upgrade_findings: across repo #68.References
rails/railsv5.1.0:actionpack/CHANGELOG.mdactiverecord/CHANGELOG.mdactivesupport/CHANGELOG.mdActiveSupport::Deprecation.warnlives in the relevantlib/file; the warning text in source is usually a more reliable detection target than the CHANGELOG line.