rails_preflight 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1119 @@
1
+ deprecations:
2
+ - id: update_attributes
3
+ # Calls only: x.update_attributes, send(:update_attributes), or a bare call with arguments; not a local of that name
4
+ pattern: "[.:]update_attributes!?\\b|(?<![.\\w:])update_attributes!?(?:\\(|\\s+[\\w:'\"@\\[{])"
5
+ message: "'update_attributes' was removed in Rails 6.1. Use 'update' instead."
6
+ removed_in: "6.1"
7
+ severity: error
8
+ confidence: "High"
9
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-record-removals"
10
+ recategorization: "Rails 6.0 -> 6.1"
11
+ fix_effort: low
12
+ - id: controller_test_positional_params
13
+ # `get :show, id: 1` or `post :create, :user => {...}`; keyword args such as params: or :format => are fine
14
+ pattern: "^\\s*(get|post|put|patch|delete|head)\\s*\\(?\\s*:\\w+\\s*,\\s*(?:(?!(?:params|session|flash|format|xhr|as|headers|body|method):)\\w+:|:(?!(?:params|session|flash|format|xhr|as|headers|body|method)\\s*=>)\\w+\\s*=>)"
15
+ message: "Controller test passes request parameters positionally. Since Rails 5.1 they must be keyword arguments, e.g. get :show, params: { id: 1 }."
16
+ removed_in: "5.1"
17
+ severity: error
18
+ confidence: "Medium"
19
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#action-pack-removals"
20
+ recategorization: "Rails 5.0 -> 5.1"
21
+ fix_effort: low
22
+ paths: [test, spec]
23
+ - id: application_secrets
24
+ pattern: "\\bRails\\.application\\.secrets\\b"
25
+ message: "'Rails.application.secrets' was removed in Rails 7.2. Use credentials, or Rails.application.config_for for non-secret settings."
26
+ removed_in: "7.2"
27
+ severity: error
28
+ confidence: "High"
29
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#railties-removals"
30
+ recategorization: "Rails 7.1 -> 7.2"
31
+ fix_effort: medium
32
+ - id: controller_force_ssl
33
+ pattern: "^\\s*force_ssl\\b"
34
+ message: "'force_ssl' at the controller level was removed in Rails 6.1. Use 'config.force_ssl' to force HTTPS for the whole app."
35
+ removed_in: "6.1"
36
+ severity: error
37
+ confidence: "Medium"
38
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#action-pack-removals"
39
+ recategorization: "Rails 6.0 -> 6.1"
40
+ fix_effort: medium
41
+ paths: [app]
42
+ - id: actionmailer_delivery_job
43
+ pattern: "\\bActionMailer::(?:Parameterized::)?DeliveryJob\\b"
44
+ message: "'ActionMailer::DeliveryJob' and 'ActionMailer::Parameterized::DeliveryJob' were removed in Rails 7.0. Mail is delivered by 'ActionMailer::MailDeliveryJob'."
45
+ removed_in: "7.0"
46
+ severity: error
47
+ confidence: "High"
48
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#action-mailer-removals"
49
+ recategorization: "Rails 6.1 -> 7.0"
50
+ fix_effort: low
51
+ - id: allow_unsafe_raw_sql
52
+ pattern: "\\ballow_unsafe_raw_sql\\b"
53
+ message: "'ActiveRecord::Base.allow_unsafe_raw_sql' was removed in Rails 7.0. Wrap raw SQL in 'Arel.sql' where you need it."
54
+ removed_in: "7.0"
55
+ severity: error
56
+ confidence: "High"
57
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
58
+ recategorization: "Rails 6.1 -> 7.0"
59
+ fix_effort: medium
60
+ - id: legacy_connection_handling
61
+ pattern: "\\blegacy_connection_handling\\b"
62
+ message: "'ActiveRecord.legacy_connection_handling' was removed in Rails 7.1. Delete the setting; the new connection handling is the only one left."
63
+ removed_in: "7.1"
64
+ severity: error
65
+ confidence: "High"
66
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-record-removals"
67
+ recategorization: "Rails 7.0 -> 7.1"
68
+ fix_effort: low
69
+ - id: active_record_partial_writes
70
+ pattern: "\\bpartial_writes\\b"
71
+ message: "'config.active_record.partial_writes' was removed in Rails 7.1. Use 'partial_inserts' and 'partial_updates' instead."
72
+ removed_in: "7.1"
73
+ severity: error
74
+ confidence: "High"
75
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-record-removals"
76
+ recategorization: "Rails 7.0 -> 7.1"
77
+ fix_effort: low
78
+ - id: per_thread_registry
79
+ pattern: "\\bActiveSupport::PerThreadRegistry\\b"
80
+ message: "'ActiveSupport::PerThreadRegistry' was removed in Rails 7.1. Use thread-local or fiber-local attributes directly."
81
+ removed_in: "7.1"
82
+ severity: error
83
+ confidence: "High"
84
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-support-removals"
85
+ recategorization: "Rails 7.0 -> 7.1"
86
+ fix_effort: medium
87
+ - id: clear_connections
88
+ pattern: "(?<!connection_handler\\.)(?<!:)\\b(?:clear_active_connections!|clear_reloadable_connections!|clear_all_connections!|flush_idle_connections!)"
89
+ message: "'ActiveRecord::Base.clear_active_connections!', 'clear_reloadable_connections!', 'clear_all_connections!' and 'flush_idle_connections!' were removed in Rails 7.2. Call the same methods on a connection handler, e.g. 'ActiveRecord::Base.connection_handler.clear_active_connections!'."
90
+ removed_in: "7.2"
91
+ severity: error
92
+ confidence: "High"
93
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
94
+ recategorization: "Rails 7.1 -> 7.2"
95
+ fix_effort: low
96
+ - id: migration_check_pending
97
+ pattern: "ActiveRecord::Migration\\.check_pending!?\\b"
98
+ message: "'ActiveRecord::Migration.check_pending' was removed in Rails 7.2. Use 'ActiveRecord::Migration.check_all_pending!'."
99
+ removed_in: "7.2"
100
+ severity: error
101
+ confidence: "Medium"
102
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
103
+ recategorization: "Rails 7.1 -> 7.2"
104
+ fix_effort: low
105
+ - id: fixture_path_assignment
106
+ pattern: "\\bfixture_path\\s*="
107
+ message: "'fixture_path' was removed in Rails 7.2. Assign 'fixture_paths' instead, which takes an array."
108
+ removed_in: "7.2"
109
+ severity: error
110
+ confidence: "High"
111
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
112
+ recategorization: "Rails 7.1 -> 7.2"
113
+ fix_effort: low
114
+ paths: [test, spec]
115
+ - id: halt_callback_chains_on_return_false
116
+ pattern: "\\bhalt_callback_chains_on_return_false\\b"
117
+ message: "'halt_callback_chains_on_return_false' was removed in Rails 5.2. Halt a callback chain with 'throw :abort'."
118
+ removed_in: "5.2"
119
+ severity: error
120
+ confidence: "High"
121
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-support"
122
+ recategorization: "Rails 5.1 -> 5.2"
123
+ fix_effort: medium
124
+ - id: string_callback_conditions
125
+ pattern: "(?:\\b(?:if|unless):|:(?:if|unless)\\s*=>)\\s*[\"']"
126
+ message: "String conditions for ':if' and ':unless' on callbacks were removed in Rails 5.2. Use a symbol or a lambda, e.g. if: -> { draft? }."
127
+ removed_in: "5.2"
128
+ severity: error
129
+ confidence: "Medium"
130
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-support"
131
+ recategorization: "Rails 5.1 -> 5.2"
132
+ fix_effort: low
133
+ paths: [app, lib]
134
+ - id: params_parser_parse_error
135
+ pattern: "\\bActionController::ParamsParser\\b"
136
+ message: "'ActionController::ParamsParser::ParseError' was removed in Rails 5.2. Rescue 'ActionDispatch::Http::Parameters::ParseError' instead."
137
+ removed_in: "5.2"
138
+ severity: error
139
+ confidence: "High"
140
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#action-pack-removals"
141
+ recategorization: "Rails 5.1 -> 5.2"
142
+ fix_effort: low
143
+ - id: erubis_handler
144
+ pattern: "\\bTemplate::Handlers::Erubis\\b"
145
+ message: "The Erubis ERB handler (ActionView::Template::Handlers::Erubis) was removed in Rails 5.2. Rails renders ERB with Erubi; subclass ActionView::Template::Handlers::ERB::Erubi instead."
146
+ removed_in: "5.2"
147
+ severity: error
148
+ confidence: "High"
149
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#action-view-removals"
150
+ recategorization: "Rails 5.1 -> 5.2"
151
+ fix_effort: medium
152
+ - id: secret_token
153
+ # Rails config only: AhoyEmail.secret_token and other gems' settings are fine
154
+ pattern: "\\b(?:config|configuration)\\.secret_token\\b"
155
+ message: "'config.secret_token' was removed in Rails 6.0. Use 'secret_key_base', held in credentials."
156
+ removed_in: "6.0"
157
+ severity: error
158
+ confidence: "High"
159
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#railties-removals"
160
+ recategorization: "Rails 5.2 -> 6.0"
161
+ fix_effort: medium
162
+ - id: image_alt_helper
163
+ # The helper took the image source; a bare image_alt or an image_alt: key is the app's own
164
+ pattern: "\\bimage_alt(?:\\s*\\(|\\s+['\"@])"
165
+ message: "The 'image_alt' helper was removed in Rails 6.0. Pass the alt text to 'image_tag' yourself."
166
+ removed_in: "6.0"
167
+ severity: error
168
+ confidence: "High"
169
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#action-view-removals"
170
+ recategorization: "Rails 5.2 -> 6.0"
171
+ fix_effort: low
172
+ - id: record_tag_helper
173
+ # Rails 5.0 moved these to the record_tag_helper gem and left stubs that raise; 6.0 deleted the stubs. With the gem they still work.
174
+ pattern: "\\b(?:div_for|content_tag_for)\\b"
175
+ message: "'div_for' and 'content_tag_for' were moved out of Rails 5.0 into the record_tag_helper gem, and raise without it. Use 'content_tag' with 'dom_id', or add the gem."
176
+ removed_in: "5.0"
177
+ unless_gem: record_tag_helper
178
+ severity: error
179
+ confidence: "High"
180
+ guide_link: "https://guides.rubyonrails.org/5_0_release_notes.html#action-view-removals"
181
+ recategorization: "Rails 4.2 -> 5.0"
182
+ fix_effort: medium
183
+ - id: fragment_cache_key
184
+ pattern: "\\bfragment_cache_key\\b"
185
+ message: "The 'fragment_cache_key' helper was removed in Rails 6.0. Use 'combined_fragment_cache_key'."
186
+ removed_in: "6.0"
187
+ severity: error
188
+ confidence: "High"
189
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#action-pack-removals"
190
+ recategorization: "Rails 5.2 -> 6.0"
191
+ fix_effort: low
192
+ - id: test_response_success
193
+ pattern: "\\bresponse\\.(?:success\\?|missing\\?|error\\?)"
194
+ message: "'response.success?', '#missing?' and '#error?' were removed from TestResponse in Rails 6.0. Use 'successful?', 'not_found?' and 'server_error?'."
195
+ removed_in: "6.0"
196
+ severity: error
197
+ confidence: "High"
198
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#action-pack-removals"
199
+ recategorization: "Rails 5.2 -> 6.0"
200
+ fix_effort: low
201
+ paths: [test, spec]
202
+ - id: enum_keyword_arguments
203
+ pattern: "^\\s*enum\\s+[a-z_]+:"
204
+ message: "Defining 'enum' with keyword arguments was removed in Rails 8.0. Pass the name positionally, e.g. enum :status, { pending: 0 }."
205
+ removed_in: "8.0"
206
+ severity: error
207
+ confidence: "Medium"
208
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
209
+ recategorization: "Rails 7.2 -> 8.0"
210
+ fix_effort: low
211
+ - id: proxy_object
212
+ pattern: "\\bActiveSupport::ProxyObject\\b"
213
+ message: "'ActiveSupport::ProxyObject' was removed in Rails 8.0. Inherit from 'BasicObject' instead."
214
+ removed_in: "8.0"
215
+ severity: error
216
+ confidence: "High"
217
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-support-removals"
218
+ recategorization: "Rails 7.2 -> 8.0"
219
+ fix_effort: low
220
+ - id: read_encrypted_secrets
221
+ pattern: "\\bread_encrypted_secrets\\b"
222
+ message: "'config.read_encrypted_secrets' was removed in Rails 8.0. Encrypted secrets were replaced by credentials."
223
+ removed_in: "8.0"
224
+ severity: error
225
+ confidence: "High"
226
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#railties-removals"
227
+ recategorization: "Rails 7.2 -> 8.0"
228
+ fix_effort: medium
229
+ - id: stats_directories
230
+ pattern: "\\bSTATS_DIRECTORIES\\b"
231
+ message: "'STATS_DIRECTORIES' was removed in Rails 8.1. Register extra directories with Rails::CodeStatistics.register_directory('Services', 'app/services')."
232
+ removed_in: "8.1"
233
+ severity: error
234
+ confidence: "High"
235
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#railties-removals"
236
+ recategorization: "Rails 8.0 -> 8.1"
237
+ fix_effort: low
238
+ - id: benchmark_ms
239
+ pattern: "\\bBenchmark\\.ms\\b"
240
+ message: "'Benchmark.ms' was removed from Active Support in Rails 8.1. Use 'Benchmark.realtime' and convert to milliseconds, or add gem \"benchmark\", \">= 0.5\" to the Gemfile, which defines it."
241
+ removed_in: "8.1"
242
+ unless_gem: "benchmark >= 0.5.0"
243
+ severity: error
244
+ confidence: "High"
245
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-support-removals"
246
+ recategorization: "Rails 8.0 -> 8.1"
247
+ fix_effort: low
248
+ - id: enqueue_after_transaction_commit
249
+ # Only the app-wide config and the symbol values went; a per-job boolean is still valid
250
+ pattern: "\\bactive_job\\.enqueue_after_transaction_commit\\b|\\benqueue_after_transaction_commit\\s*=\\s*:(?:never|always|default)\\b"
251
+ message: "'config.active_job.enqueue_after_transaction_commit' and its :never, :always and :default values were removed in Rails 8.1. Set 'self.enqueue_after_transaction_commit = true' or 'false' on the job class instead."
252
+ removed_in: "8.1"
253
+ severity: error
254
+ confidence: "High"
255
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-job-removals"
256
+ recategorization: "Rails 8.0 -> 8.1"
257
+ fix_effort: low
258
+ - id: migrator_schema_migrations_table_name
259
+ pattern: "\\bschema_migrations_table_name\\b"
260
+ message: "'ActiveRecord::Migrator.schema_migrations_table_name' was removed in Rails 5.2. Use 'ActiveRecord::SchemaMigration.table_name'."
261
+ removed_in: "5.2"
262
+ severity: error
263
+ confidence: "Medium"
264
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-record-removals"
265
+ recategorization: "Rails 5.1 -> 5.2"
266
+ fix_effort: low
267
+ - id: supports_migrations
268
+ pattern: "\\bsupports_migrations\\?"
269
+ message: "'supports_migrations?' was removed from connection adapters in Rails 5.2. Every supported adapter supports migrations, so drop the check."
270
+ removed_in: "5.2"
271
+ severity: error
272
+ confidence: "High"
273
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-record-removals"
274
+ recategorization: "Rails 5.1 -> 5.2"
275
+ fix_effort: low
276
+ - id: migrator_migrations_path
277
+ pattern: "ActiveRecord::Migrator\\.migrations_path\\s*="
278
+ message: "'ActiveRecord::Migrator.migrations_path=' was removed in Rails 6.0. Set 'config.paths[\"db/migrate\"]' instead."
279
+ removed_in: "6.0"
280
+ severity: error
281
+ confidence: "High"
282
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#active-record-removals"
283
+ recategorization: "Rails 5.2 -> 6.0"
284
+ fix_effort: low
285
+ - id: add_foreign_key_deferrable_true
286
+ pattern: "\\bdeferrable:\\s*true\\b"
287
+ message: "'deferrable: true' on 'add_foreign_key' was removed in Rails 7.2. Pass 'deferrable: :immediate' or ':deferred'."
288
+ removed_in: "7.2"
289
+ severity: error
290
+ confidence: "High"
291
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
292
+ recategorization: "Rails 7.1 -> 7.2"
293
+ fix_effort: low
294
+ - id: schema_cache_env
295
+ pattern: "ENV\\[[\"']SCHEMA_CACHE[\"']\\]"
296
+ message: "Setting ENV['SCHEMA_CACHE'] was removed in Rails 8.0. Use 'config.active_record.schema_cache_ignored_tables' or the dump file path config."
297
+ removed_in: "8.0"
298
+ severity: error
299
+ confidence: "High"
300
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
301
+ recategorization: "Rails 7.2 -> 8.0"
302
+ fix_effort: low
303
+ - id: unsigned_float_decimal
304
+ pattern: "\\bunsigned_(?:float|decimal)\\b"
305
+ message: "The ':unsigned_float' and ':unsigned_decimal' MySQL column methods were removed in Rails 8.1. Use ':float' or ':decimal' with a check constraint."
306
+ removed_in: "8.1"
307
+ severity: error
308
+ confidence: "High"
309
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-record-removals"
310
+ recategorization: "Rails 8.0 -> 8.1"
311
+ fix_effort: medium
312
+ - id: render_text_nothing
313
+ pattern: "\\brender\\s*\\(?\\s*(?:(?:text|nothing):|:(?:text|nothing)\\s*=>)"
314
+ message: "'render :text' and 'render :nothing' were removed in Rails 5.1. Use 'render plain:' or 'head :ok'."
315
+ removed_in: "5.1"
316
+ severity: error
317
+ confidence: "High"
318
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#action-pack-removals"
319
+ recategorization: "Rails 5.0 -> 5.1"
320
+ fix_effort: low
321
+ paths: [app, lib]
322
+ - id: controller_filters
323
+ pattern: "\\b(?:(?:prepend|append|skip)_)?(?:before|after|around)_filter\\b"
324
+ message: "The '*_filter' controller callbacks were removed in Rails 5.1. Use the '*_action' equivalents, e.g. before_action."
325
+ removed_in: "5.1"
326
+ severity: error
327
+ confidence: "High"
328
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#action-pack-removals"
329
+ recategorization: "Rails 5.0 -> 5.1"
330
+ fix_effort: low
331
+ paths: [app, lib]
332
+ - id: serve_static_files
333
+ pattern: "\\b(?:serve_static_files|static_cache_control)\\b"
334
+ message: "'config.serve_static_files' and 'config.static_cache_control' were removed in Rails 5.1. Use 'config.public_file_server.enabled' and 'config.public_file_server.headers'."
335
+ removed_in: "5.1"
336
+ severity: error
337
+ confidence: "High"
338
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#railties-removals"
339
+ recategorization: "Rails 5.0 -> 5.1"
340
+ fix_effort: low
341
+ - id: raise_in_transactional_callbacks
342
+ pattern: "\\braise_in_transactional_callbacks\\b"
343
+ message: "'config.active_record.raise_in_transactional_callbacks' was removed in Rails 5.1. Errors in transactional callbacks always raise now; delete the setting."
344
+ removed_in: "5.1"
345
+ severity: error
346
+ confidence: "High"
347
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-record-removals"
348
+ recategorization: "Rails 5.0 -> 5.1"
349
+ fix_effort: low
350
+ - id: use_transactional_fixtures
351
+ # RSpec's own config.use_transactional_fixtures in spec/ is still valid, so test/ only
352
+ pattern: "\\buse_transactional_fixtures\\b"
353
+ message: "'use_transactional_fixtures' was removed in Rails 5.1. Use 'use_transactional_tests'."
354
+ removed_in: "5.1"
355
+ severity: error
356
+ confidence: "High"
357
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-record-removals"
358
+ recategorization: "Rails 5.0 -> 5.1"
359
+ fix_effort: low
360
+ paths: [test]
361
+ - id: module_parent
362
+ pattern: "\\bparent_name\\b|\\.class\\.parent\\b"
363
+ message: "'Module#parent', '#parent_name' and '#parents' were removed in Rails 6.1. Use 'module_parent', 'module_parent_name' and 'module_parents'."
364
+ removed_in: "6.1"
365
+ severity: error
366
+ confidence: "Medium"
367
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-support-removals"
368
+ recategorization: "Rails 6.0 -> 6.1"
369
+ fix_effort: low
370
+ - id: represent_boolean_as_integer
371
+ pattern: "\\brepresent_boolean_as_integer\\b"
372
+ message: "'config.active_record.sqlite3.represent_boolean_as_integer' was removed in Rails 6.1. Booleans are always stored as integers in SQLite; delete the setting."
373
+ removed_in: "6.1"
374
+ severity: error
375
+ confidence: "High"
376
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-record-removals"
377
+ recategorization: "Rails 6.0 -> 6.1"
378
+ fix_effort: low
379
+ - id: active_storage_queue
380
+ pattern: "\\bactive_storage\\.queue\\s*="
381
+ message: "'config.active_storage.queue' was removed in Rails 6.1. Set the per-job queues with 'config.active_storage.queues'."
382
+ removed_in: "6.1"
383
+ severity: error
384
+ confidence: "High"
385
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-storage-removals"
386
+ recategorization: "Rails 6.0 -> 6.1"
387
+ fix_effort: low
388
+ - id: logger_silence_constant
389
+ pattern: "(?<!::)\\bLoggerSilence\\b"
390
+ message: "The top-level 'LoggerSilence' constant was removed in Rails 6.1. Use 'ActiveSupport::LoggerSilence'."
391
+ removed_in: "6.1"
392
+ severity: error
393
+ confidence: "High"
394
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-support-removals"
395
+ recategorization: "Rails 6.0 -> 6.1"
396
+ fix_effort: low
397
+ - id: connection_config
398
+ pattern: "\\.connection_config\\b"
399
+ message: "'ActiveRecord::Base.connection_config' was removed in Rails 7.0. Use 'connection_db_config'."
400
+ removed_in: "7.0"
401
+ severity: error
402
+ confidence: "High"
403
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
404
+ recategorization: "Rails 6.1 -> 7.0"
405
+ fix_effort: low
406
+ - id: arel_attribute
407
+ pattern: "\\barel_attribute\\("
408
+ message: "'ActiveRecord::Base.arel_attribute' was removed in Rails 7.0. Use 'arel_table[:column]'."
409
+ removed_in: "7.0"
410
+ severity: error
411
+ confidence: "High"
412
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
413
+ recategorization: "Rails 6.1 -> 7.0"
414
+ fix_effort: low
415
+ - id: connected_to_database
416
+ pattern: "\\bconnected_to\\s*\\(?\\s*database:"
417
+ message: "The 'database:' argument to 'connected_to' was removed in Rails 7.0. Use 'role:' and 'shard:' with 'connects_to'."
418
+ removed_in: "7.0"
419
+ severity: error
420
+ confidence: "High"
421
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
422
+ recategorization: "Rails 6.1 -> 7.0"
423
+ fix_effort: medium
424
+ - id: db_structure_tasks
425
+ pattern: "\\bdb:(?:structure:(?:dump|load|load_if_sql)|schema:load_if_ruby|test:load_structure)\\b"
426
+ message: "The 'db:structure:*', 'db:schema:load_if_ruby' and 'db:test:load_structure' tasks were removed in Rails 7.0. Use 'db:schema:dump' and 'db:schema:load' with config.active_record.schema_format = :sql."
427
+ removed_in: "7.0"
428
+ severity: error
429
+ confidence: "High"
430
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
431
+ recategorization: "Rails 6.1 -> 7.0"
432
+ fix_effort: low
433
+ files: [code, scripts]
434
+ - id: use_sha1_digests
435
+ pattern: "\\buse_sha1_digests\\b"
436
+ message: "'config.active_support.use_sha1_digests' was removed in Rails 7.0. Use 'config.active_support.hash_digest_class = OpenSSL::Digest::SHA1' if you still need SHA1."
437
+ removed_in: "7.0"
438
+ severity: error
439
+ confidence: "High"
440
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-support-removals"
441
+ recategorization: "Rails 6.1 -> 7.0"
442
+ fix_effort: low
443
+ - id: uri_parser
444
+ pattern: "\\bURI\\.parser\\b"
445
+ message: "'URI.parser' was removed in Rails 7.0. Use 'URI::DEFAULT_PARSER'."
446
+ removed_in: "7.0"
447
+ severity: error
448
+ confidence: "High"
449
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-support-removals"
450
+ recategorization: "Rails 6.1 -> 7.0"
451
+ fix_effort: low
452
+ - id: action_view_raise_on_missing_translations
453
+ pattern: "\\baction_view\\.raise_on_missing_translations\\b"
454
+ message: "'config.action_view.raise_on_missing_translations' was removed in Rails 7.0. Use 'config.i18n.raise_on_missing_translations'."
455
+ removed_in: "7.0"
456
+ severity: error
457
+ confidence: "High"
458
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#action-view-removals"
459
+ recategorization: "Rails 6.1 -> 7.0"
460
+ fix_effort: low
461
+ - id: hosts_response_app
462
+ pattern: "\\bhosts_response_app\\b"
463
+ message: "'config.action_dispatch.hosts_response_app' was removed in Rails 7.0. Use 'config.host_authorization = { response_app: ... }'."
464
+ removed_in: "7.0"
465
+ severity: error
466
+ confidence: "High"
467
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#action-pack-removals"
468
+ recategorization: "Rails 6.1 -> 7.0"
469
+ fix_effort: low
470
+ - id: to_s_format
471
+ pattern: "\\.to_s\\(\\s*:\\w+"
472
+ message: "Passing a format to 'to_s' on dates, times, numbers, arrays and ranges was removed in Rails 7.1. Use 'to_fs', e.g. created_at.to_fs(:db)."
473
+ removed_in: "7.1"
474
+ severity: error
475
+ confidence: "Medium"
476
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-support-removals"
477
+ recategorization: "Rails 7.0 -> 7.1"
478
+ fix_effort: low
479
+ - id: system_test_poltergeist_webkit
480
+ pattern: "\\bdriven_by\\s*\\(?\\s*:(?:poltergeist|webkit)\\b"
481
+ message: "Rails stopped registering the :poltergeist and :webkit system test drivers in 7.1. Use :selenium, or register another driver yourself."
482
+ removed_in: "7.1"
483
+ severity: error
484
+ confidence: "High"
485
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#action-pack-removals"
486
+ recategorization: "Rails 7.0 -> 7.1"
487
+ fix_effort: medium
488
+ paths: [test, spec]
489
+ - id: active_storage_current_host
490
+ pattern: "\\bActiveStorage::Current\\.host\\b"
491
+ message: "'ActiveStorage::Current.host' was removed in Rails 7.1. Use 'ActiveStorage::Current.url_options'."
492
+ removed_in: "7.1"
493
+ severity: error
494
+ confidence: "High"
495
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-storage-removals"
496
+ recategorization: "Rails 7.0 -> 7.1"
497
+ fix_effort: low
498
+ - id: configs_for_include_replicas
499
+ pattern: "\\binclude_replicas:"
500
+ message: "The ':include_replicas' option to 'configs_for' was removed in Rails 7.1. Use ':include_hidden'."
501
+ removed_in: "7.1"
502
+ severity: error
503
+ confidence: "High"
504
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-record-removals"
505
+ recategorization: "Rails 7.0 -> 7.1"
506
+ fix_effort: low
507
+ - id: commit_transaction_on_non_local_return
508
+ pattern: "\\bcommit_transaction_on_non_local_return\\b"
509
+ message: "'config.active_record.commit_transaction_on_non_local_return' was removed in Rails 8.0. Delete the setting."
510
+ removed_in: "8.0"
511
+ severity: error
512
+ confidence: "High"
513
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
514
+ recategorization: "Rails 7.2 -> 8.0"
515
+ fix_effort: low
516
+ - id: allow_deprecated_singular_associations_name
517
+ pattern: "\\ballow_deprecated_singular_associations_name\\b"
518
+ message: "'config.active_record.allow_deprecated_singular_associations_name' was removed in Rails 8.0. Delete the setting and use the exact association name in queries, e.g. where(comments: ...) for has_many :comments."
519
+ removed_in: "8.0"
520
+ severity: error
521
+ confidence: "High"
522
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
523
+ recategorization: "Rails 7.2 -> 8.0"
524
+ fix_effort: low
525
+ - id: warn_on_records_fetched_greater_than
526
+ pattern: "\\bwarn_on_records_fetched_greater_than\\b"
527
+ message: "'config.active_record.warn_on_records_fetched_greater_than' was removed in Rails 8.0. Delete the setting."
528
+ removed_in: "8.0"
529
+ severity: error
530
+ confidence: "High"
531
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
532
+ recategorization: "Rails 7.2 -> 8.0"
533
+ fix_effort: low
534
+ - id: sqlite3_deprecated_warning
535
+ pattern: "\\bsqlite3_deprecated_warning\\b"
536
+ message: "'config.active_record.sqlite3_deprecated_warning' was removed in Rails 8.0. Delete the setting."
537
+ removed_in: "8.0"
538
+ severity: error
539
+ confidence: "High"
540
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
541
+ recategorization: "Rails 7.2 -> 8.0"
542
+ fix_effort: low
543
+ - id: connection_pool_connection
544
+ pattern: "\\bconnection_pool\\.connection\\b"
545
+ message: "'ConnectionPool#connection' was removed in Rails 8.0. Use 'with_connection { |conn| ... }' or 'lease_connection'."
546
+ removed_in: "8.0"
547
+ severity: error
548
+ confidence: "High"
549
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-record-removals"
550
+ recategorization: "Rails 7.2 -> 8.0"
551
+ fix_effort: low
552
+ - id: allow_deprecated_parameters_hash_equality
553
+ pattern: "\\ballow_deprecated_parameters_hash_equality\\b"
554
+ message: "'config.action_controller.allow_deprecated_parameters_hash_equality' was removed in Rails 8.0. Compare 'params.to_h' instead of the Parameters object, then delete the setting."
555
+ removed_in: "8.0"
556
+ severity: error
557
+ confidence: "High"
558
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#action-pack-removals"
559
+ recategorization: "Rails 7.2 -> 8.0"
560
+ fix_effort: low
561
+ - id: use_big_decimal_serializer
562
+ pattern: "\\buse_big_decimal_serializer\\b"
563
+ message: "'config.active_job.use_big_decimal_serializer' was removed in Rails 8.0. BigDecimal arguments always use the BigDecimal serializer; delete the setting."
564
+ removed_in: "8.0"
565
+ severity: error
566
+ confidence: "High"
567
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#active-job-removals"
568
+ recategorization: "Rails 7.2 -> 8.0"
569
+ fix_effort: low
570
+ - id: rails_console_methods
571
+ pattern: "\\bRails::ConsoleMethods\\b"
572
+ message: "Extending the console through 'Rails::ConsoleMethods' was removed in Rails 8.0. Use a 'console do' block in config/application.rb or IRB's helper API."
573
+ removed_in: "8.0"
574
+ severity: error
575
+ confidence: "High"
576
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#railties-removals"
577
+ recategorization: "Rails 7.2 -> 8.0"
578
+ fix_effort: low
579
+ - id: form_with_model_nil
580
+ pattern: "\\bform_with\\b.*\\bmodel:\\s*nil\\b"
581
+ message: "Passing 'model: nil' to 'form_with' was removed in Rails 8.0. Leave out 'model:' when the form has no model."
582
+ removed_in: "8.0"
583
+ severity: error
584
+ confidence: "High"
585
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#action-view-removals"
586
+ recategorization: "Rails 7.2 -> 8.0"
587
+ fix_effort: low
588
+ paths: [app]
589
+ - id: route_multiple_paths
590
+ pattern: "^\\s*(?:get|post|put|patch|delete|match)\\s*\\(?\\s*\\["
591
+ message: "Mapping one route to several paths, e.g. get ['/a', '/b'], was removed in Rails 8.1. Declare one route per path."
592
+ removed_in: "8.1"
593
+ severity: error
594
+ confidence: "Medium"
595
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#action-pack-removals"
596
+ recategorization: "Rails 8.0 -> 8.1"
597
+ fix_effort: low
598
+ paths: [config]
599
+ - id: qu_queue_adapter
600
+ pattern: "\\bqueue_adapter\\s*=\\s*:qu\\b"
601
+ message: "Active Job's Qu adapter was removed in Rails 6.0. Move the jobs to another backend, e.g. Sidekiq or Solid Queue."
602
+ removed_in: "6.0"
603
+ severity: error
604
+ confidence: "High"
605
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#active-job-removals"
606
+ recategorization: "Rails 5.2 -> 6.0"
607
+ fix_effort: medium
608
+ - id: http_parameter_filter
609
+ pattern: "\\bActionDispatch::Http::ParameterFilter\\b"
610
+ message: "'ActionDispatch::Http::ParameterFilter' was removed in Rails 6.1. Use 'ActiveSupport::ParameterFilter'."
611
+ removed_in: "6.1"
612
+ severity: error
613
+ confidence: "High"
614
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#action-pack-removals"
615
+ recategorization: "Rails 6.0 -> 6.1"
616
+ fix_effort: low
617
+ - id: mailer_receive
618
+ pattern: "\\b\\w*Mailer\\.receive\\b"
619
+ message: "'ActionMailer::Base.receive' was removed in Rails 6.1. Process incoming mail with Action Mailbox."
620
+ removed_in: "6.1"
621
+ severity: error
622
+ confidence: "Medium"
623
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#action-mailer-removals"
624
+ recategorization: "Rails 6.0 -> 6.1"
625
+ fix_effort: high
626
+ - id: active_storage_downloading
627
+ pattern: "\\bActiveStorage::Downloading\\b"
628
+ message: "'ActiveStorage::Downloading' was removed in Rails 6.1. Use 'ActiveStorage::Blob#open' to work with a blob as a local file."
629
+ removed_in: "6.1"
630
+ severity: error
631
+ confidence: "High"
632
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-storage-removals"
633
+ recategorization: "Rails 6.0 -> 6.1"
634
+ fix_effort: low
635
+ - id: variant_combine_options
636
+ pattern: "\\bcombine_options(?::|\\s*=>)"
637
+ message: "Passing ':combine_options' to an Active Storage variant was removed in Rails 6.1. Pass the operations directly, e.g. variant(resize_to_limit: [100, 100])."
638
+ removed_in: "6.1"
639
+ severity: error
640
+ confidence: "Medium"
641
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-storage-removals"
642
+ recategorization: "Rails 6.0 -> 6.1"
643
+ fix_effort: low
644
+ paths: [app, lib]
645
+ - id: return_only_media_type_on_content_type
646
+ pattern: "\\breturn_only_media_type_on_content_type\\b"
647
+ message: "'config.action_dispatch.return_only_media_type_on_content_type' was removed in Rails 7.0. Remove it; Content-Type now always includes the charset."
648
+ removed_in: "7.0"
649
+ severity: error
650
+ confidence: "High"
651
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#action-pack-removals"
652
+ recategorization: "Rails 6.1 -> 7.0"
653
+ fix_effort: low
654
+ - id: return_false_on_aborted_enqueue
655
+ pattern: "\\breturn_false_on_aborted_enqueue\\b"
656
+ message: "'config.active_job.return_false_on_aborted_enqueue' was removed in Rails 7.0. Remove it; an aborted enqueue now always returns false."
657
+ removed_in: "7.0"
658
+ severity: error
659
+ confidence: "High"
660
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-job-removals"
661
+ recategorization: "Rails 6.1 -> 7.0"
662
+ fix_effort: low
663
+ - id: active_record_base_config_accessors
664
+ pattern: "\\bActiveRecord::Base\\.(?:reading_role|writing_role|default_timezone|index_nested_attribute_errors|verbose_query_logs|queues|warn_on_records_fetched_greater_than|maintain_test_schema|application_record_class|action_on_strict_loading_violation|schema_format|error_on_ignored_order|timestamped_migrations|dump_schema_after_migration|dump_schemas|suppress_multiple_database_warning)\\b"
665
+ message: "Config accessors on 'ActiveRecord::Base' (e.g. ActiveRecord::Base.default_timezone) were removed in Rails 7.1. Use the same name on 'ActiveRecord', e.g. ActiveRecord.default_timezone, or config.active_record.*."
666
+ removed_in: "7.1"
667
+ severity: error
668
+ confidence: "High"
669
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-record-removals"
670
+ recategorization: "Rails 7.0 -> 7.1"
671
+ fix_effort: low
672
+ - id: trusted_proxies_single_value
673
+ pattern: "\\btrusted_proxies\\s*=\\s*(?:IPAddr\\.new|[\"'])"
674
+ message: "Assigning a single value to 'config.action_dispatch.trusted_proxies' was removed in Rails 7.1. Assign an array, e.g. [IPAddr.new(\"10.0.0.0/8\")]."
675
+ removed_in: "7.1"
676
+ severity: error
677
+ confidence: "Medium"
678
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#action-pack-removals"
679
+ recategorization: "Rails 7.0 -> 7.1"
680
+ fix_effort: low
681
+ - id: removed_core_ext_files
682
+ pattern: "\\brequire\\s*\\(?\\s*[\"']active_support/core_ext/(?:uri|range/include_time_with_zone)[\"']"
683
+ message: "'active_support/core_ext/uri' and 'active_support/core_ext/range/include_time_with_zone' were removed in Rails 7.1. Drop the require."
684
+ removed_in: "7.1"
685
+ severity: error
686
+ confidence: "High"
687
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-support-removals"
688
+ recategorization: "Rails 7.0 -> 7.1"
689
+ fix_effort: low
690
+ - id: schema_file_type
691
+ pattern: "\\bDatabaseTasks\\.schema_file_type\\b"
692
+ message: "'ActiveRecord::Tasks::DatabaseTasks.schema_file_type' was removed in Rails 7.1. Use 'schema_dump_path' for the file path."
693
+ removed_in: "7.1"
694
+ severity: error
695
+ confidence: "High"
696
+ guide_link: "https://guides.rubyonrails.org/7_1_release_notes.html#active-record-removals"
697
+ recategorization: "Rails 7.0 -> 7.1"
698
+ fix_effort: low
699
+ - id: static_cache_control
700
+ pattern: "\\bstatic_cache_control\\b"
701
+ message: "'config.static_cache_control' was removed in Rails 5.1. Set headers with config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }."
702
+ removed_in: "5.1"
703
+ severity: error
704
+ confidence: "High"
705
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#railties-removals"
706
+ recategorization: "Rails 5.0 -> 5.1"
707
+ fix_effort: low
708
+ - id: length_validator_tokenizer
709
+ # The option took a proc; a string tokenizer is search-index config (Chewy, Elasticsearch)
710
+ pattern: "(?:\\btokenizer:|:tokenizer\\s*=>)\\s*(?:->|lambda\\b|proc\\b|Proc\\.new\\b|method\\s*\\()"
711
+ message: "The ':tokenizer' option of the length validator was removed in Rails 5.1. Count tokens in a custom validator instead."
712
+ removed_in: "5.1"
713
+ severity: error
714
+ confidence: "Medium"
715
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-model-removals"
716
+ recategorization: "Rails 5.0 -> 5.1"
717
+ fix_effort: medium
718
+ paths: [app, lib]
719
+ - id: original_exception
720
+ pattern: "\\.original_exception\\b"
721
+ message: "'#original_exception' on ActionView::Template::Error and ActiveJob::DeserializationError was removed in Rails 5.1. Use '#cause'."
722
+ removed_in: "5.1"
723
+ severity: error
724
+ confidence: "Medium"
725
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#action-view-removals"
726
+ recategorization: "Rails 5.0 -> 5.1"
727
+ fix_effort: low
728
+ - id: delete_destroy_all_conditions
729
+ # A bare delete_all(x) is usually the class's own method; misses a model calling its own bare delete_all(conditions)
730
+ pattern: "\\.(?:delete|destroy)_all\\s*\\(\\s*(?!\\)|:(?:delete_all|nullify|destroy)\\b)\\S"
731
+ message: "Passing conditions to 'delete_all' or 'destroy_all' was removed in Rails 5.1. Use where(...).delete_all or where(...).destroy_all."
732
+ removed_in: "5.1"
733
+ severity: error
734
+ confidence: "Medium"
735
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-record-removals"
736
+ recategorization: "Rails 5.0 -> 5.1"
737
+ fix_effort: low
738
+ paths: [app, lib]
739
+ - id: errors_get_set
740
+ pattern: "(?<!@)\\berrors\\.(?:get|set|add_on_empty|add_on_blank)\\b|(?<!@)\\berrors\\[\\s*[:\"'][^\\]]*\\]\\s*=(?![=>\\x7e])"
741
+ message: "'errors.get', 'errors.set', 'errors[]=', 'add_on_empty' and 'add_on_blank' were removed in Rails 5.1. Use errors[:attr] to read and errors.add to add."
742
+ removed_in: "5.1"
743
+ severity: error
744
+ confidence: "High"
745
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-model-removals"
746
+ recategorization: "Rails 5.0 -> 5.1"
747
+ fix_effort: low
748
+ needs_receiver_in: [app/helpers, app/views]
749
+ skip_bare_if_local: errors
750
+ - id: dispatch_callbacks_to_prepare
751
+ pattern: "\\bActionDispatch::Callbacks\\.to_(?:prepare|cleanup)\\b"
752
+ message: "'ActionDispatch::Callbacks.to_prepare' and '.to_cleanup' were removed in Rails 5.1. Use ActiveSupport::Reloader.to_prepare and .to_complete."
753
+ removed_in: "5.1"
754
+ severity: error
755
+ confidence: "High"
756
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#action-pack-removals"
757
+ recategorization: "Rails 5.0 -> 5.1"
758
+ fix_effort: low
759
+ - id: concurrency_latch
760
+ pattern: "\\bActiveSupport::Concurrency::Latch\\b"
761
+ message: "'ActiveSupport::Concurrency::Latch' was removed in Rails 5.1. Use Concurrent::CountDownLatch from concurrent-ruby."
762
+ removed_in: "5.1"
763
+ severity: error
764
+ confidence: "High"
765
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#active-support"
766
+ recategorization: "Rails 5.0 -> 5.1"
767
+ fix_effort: low
768
+ - id: error_on_ignored_order_or_limit
769
+ pattern: "\\berror_on_ignored_order_or_limit\\b"
770
+ message: "'error_on_ignored_order_or_limit' was removed in Rails 5.2. Use 'error_on_ignored_order'."
771
+ removed_in: "5.2"
772
+ severity: error
773
+ confidence: "High"
774
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-record-removals"
775
+ recategorization: "Rails 5.1 -> 5.2"
776
+ fix_effort: low
777
+ - id: association_class_name_constant
778
+ # Associations only; other DSLs take class_name: Constant (Discourse's service policies). Misses a class_name: on a continuation line
779
+ pattern: "\\b(?:belongs_to|has_many|has_one|has_and_belongs_to_many)\\b[^#\\n]*(?:\\bclass_name:|:class_name\\s*=>)\\s*(?:::)?[A-Z]\\w*(?:::[A-Z]\\w*)*\\s*(?:,|\\)|$)"
780
+ message: "Passing a class to ':class_name' on an association was removed in Rails 5.2. Pass the class name as a string, e.g. class_name: \"User\"."
781
+ removed_in: "5.2"
782
+ severity: error
783
+ confidence: "High"
784
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#active-record-removals"
785
+ recategorization: "Rails 5.1 -> 5.2"
786
+ fix_effort: low
787
+ paths: [app, lib]
788
+ - id: cache_key_timestamp_name
789
+ pattern: "\\bcache_key\\(\\s*:\\w+"
790
+ message: "Passing a timestamp name to '#cache_key' was removed in Rails 6.0. Call cache_key without arguments; cache_version carries the timestamp."
791
+ removed_in: "6.0"
792
+ severity: error
793
+ confidence: "Medium"
794
+ guide_link: "https://guides.rubyonrails.org/6_0_release_notes.html#active-record-removals"
795
+ recategorization: "Rails 5.2 -> 6.0"
796
+ fix_effort: low
797
+ - id: removed_core_ext_files_6_1
798
+ pattern: "\\brequire\\s*\\(?\\s*[\"']active_support/core_ext/(?:array/prepend_and_append|hash/compact|hash/transform_values|module/reachable|numeric/inquiry|range/include_range)[\"']"
799
+ message: "These active_support/core_ext files were removed in Rails 6.1 (Ruby has the methods): array/prepend_and_append, hash/compact, hash/transform_values, module/reachable, numeric/inquiry, range/include_range. Drop the require."
800
+ removed_in: "6.1"
801
+ severity: error
802
+ confidence: "High"
803
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-support-removals"
804
+ recategorization: "Rails 6.0 -> 6.1"
805
+ fix_effort: low
806
+ - id: render_file_relative_path
807
+ pattern: "\\brender\\s*\\(?\\s*(?:file:|:file\\s*=>)\\s*[\"'](?!/|#\\{Rails\\.root|public/)"
808
+ message: "Passing a relative path to 'render file:' was removed in Rails 6.1. Pass an absolute path, e.g. Rails.root.join(\"public/404.html\"), or use render template:."
809
+ removed_in: "6.1"
810
+ severity: error
811
+ confidence: "Medium"
812
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#action-view-removals"
813
+ recategorization: "Rails 6.0 -> 6.1"
814
+ fix_effort: low
815
+ paths: [app, lib]
816
+ - id: mb_chars_normalize
817
+ pattern: "\\bmb_chars\\.normalize\\b"
818
+ message: "'ActiveSupport::Multibyte::Chars#normalize' was removed in Rails 6.1. Use String#unicode_normalize."
819
+ removed_in: "6.1"
820
+ severity: error
821
+ confidence: "High"
822
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#active-support-removals"
823
+ recategorization: "Rails 6.0 -> 6.1"
824
+ fix_effort: low
825
+ - id: errors_hash_methods
826
+ pattern: "(?<!@)\\berrors\\.(?:keys|values|to_h|slice!|to_xml)\\b"
827
+ message: "'ActiveModel::Errors#keys', '#values', '#to_h', '#slice!' and '#to_xml' were removed in Rails 7.0. Use errors.attribute_names, errors.to_hash or the ActiveModel::Error objects errors.each yields."
828
+ removed_in: "7.0"
829
+ severity: error
830
+ confidence: "Medium"
831
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-model-removals"
832
+ recategorization: "Rails 6.1 -> 7.0"
833
+ fix_effort: low
834
+ needs_receiver_in: [app/helpers, app/views]
835
+ skip_bare_if_local: errors
836
+ - id: errors_messages_mutation
837
+ pattern: "(?<!@)\\berrors(?:\\.messages)?\\[[^\\]]+\\]\\s*<<|(?<!@)\\berrors\\.messages(?:\\[[^\\]]+\\]\\s*=(?![=>\\x7e])|\\.(?:delete|clear)\\b)"
838
+ message: "Changing error messages in place (errors[:attr] << msg, errors.messages[:attr] = ..., errors.messages.delete/clear) was removed in Rails 7.0: it now changes a copy, so the error is silently lost. Use errors.add, errors.delete and errors.clear."
839
+ removed_in: "7.0"
840
+ severity: error
841
+ confidence: "High"
842
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-model-removals"
843
+ recategorization: "Rails 6.1 -> 7.0"
844
+ fix_effort: low
845
+ needs_receiver_in: [app/helpers, app/views]
846
+ skip_bare_if_local: errors
847
+ - id: errors_each_two_args
848
+ pattern: "(?<!@)\\berrors\\.each\\s*(?:do|\\{)\\s*\\|\\s*\\w+\\s*,\\s*\\w+\\s*\\|"
849
+ message: "Enumerating 'ActiveModel::Errors' as a hash (errors.each { |attribute, message| }) was removed in Rails 7.0: each now yields ActiveModel::Error objects, so the second argument is nil. Use errors.each { |error| error.attribute; error.message }."
850
+ removed_in: "7.0"
851
+ severity: error
852
+ confidence: "High"
853
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-model-removals"
854
+ recategorization: "Rails 6.1 -> 7.0"
855
+ fix_effort: low
856
+ needs_receiver_in: [app/helpers, app/views]
857
+ skip_bare_if_local: errors
858
+ - id: configurations_to_h
859
+ pattern: "\\bconfigurations\\.(?:to_h|default_hash)\\b"
860
+ message: "'ActiveRecord::Base.configurations.to_h' and '.default_hash' were removed in Rails 7.0. Use configurations.configs_for(env_name: ...)."
861
+ removed_in: "7.0"
862
+ severity: error
863
+ confidence: "High"
864
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
865
+ recategorization: "Rails 6.1 -> 7.0"
866
+ fix_effort: low
867
+ - id: db_config_spec_name
868
+ pattern: "\\bspec_name\\b"
869
+ message: "'spec_name' on database configs (and configs_for(spec_name:)) was removed in Rails 7.0. Use 'name'."
870
+ removed_in: "7.0"
871
+ severity: error
872
+ confidence: "Medium"
873
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
874
+ recategorization: "Rails 6.1 -> 7.0"
875
+ fix_effort: low
876
+ - id: database_tasks_removed_methods
877
+ pattern: "\\bDatabaseTasks\\.(?:current_config|dump_filename|schema_file|spec)\\b"
878
+ message: "'DatabaseTasks.current_config', '.dump_filename', '.schema_file' and '.spec' were removed in Rails 7.0. Use schema_dump_path for the schema file, and configs_for for configs."
879
+ removed_in: "7.0"
880
+ severity: error
881
+ confidence: "High"
882
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#active-record-removals"
883
+ recategorization: "Rails 6.1 -> 7.0"
884
+ fix_effort: low
885
+ - id: mailgun_api_key
886
+ pattern: "\\bMAILGUN_INGRESS_API_KEY\\b|\\baction_mailbox\\.mailgun_api_key\\b"
887
+ message: "Action Mailbox's Mailgun API key setting (MAILGUN_INGRESS_API_KEY, credentials action_mailbox.mailgun_api_key) was removed in Rails 7.0. Use the signing key: MAILGUN_INGRESS_SIGNING_KEY or action_mailbox.mailgun_signing_key."
888
+ removed_in: "7.0"
889
+ severity: error
890
+ confidence: "High"
891
+ guide_link: "https://guides.rubyonrails.org/7_0_release_notes.html#action-mailbox-removals"
892
+ recategorization: "Rails 6.1 -> 7.0"
893
+ fix_effort: low
894
+ - id: retry_on_exponentially_longer
895
+ pattern: ":exponentially_longer\\b"
896
+ message: "The ':exponentially_longer' wait for retry_on was removed in Rails 7.2. Use ':polynomially_longer', which is the same algorithm under its correct name."
897
+ removed_in: "7.2"
898
+ severity: error
899
+ confidence: "High"
900
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-job-removals"
901
+ recategorization: "Rails 7.1 -> 7.2"
902
+ fix_effort: low
903
+ - id: cache_store_pool_size
904
+ pattern: "\\bcache_store\\b.*\\bpool_(?:size|timeout):"
905
+ message: "The ':pool_size' and ':pool_timeout' cache store options were removed in Rails 7.2. Pass pool: { size: 5, timeout: 5 }."
906
+ removed_in: "7.2"
907
+ severity: error
908
+ confidence: "High"
909
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-support-removals"
910
+ recategorization: "Rails 7.1 -> 7.2"
911
+ fix_effort: low
912
+ paths: [config]
913
+ - id: mem_cache_store_dalli_client
914
+ pattern: "\\bmem_cache_store\\b.*\\bDalli::Client\\.new\\b"
915
+ message: "Passing a Dalli::Client instance to MemCacheStore was removed in Rails 7.2. Pass the server addresses and options instead, e.g. :mem_cache_store, \"cache-1.example.com\", { pool: { size: 5 } }."
916
+ removed_in: "7.2"
917
+ severity: error
918
+ confidence: "High"
919
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-support-removals"
920
+ recategorization: "Rails 7.1 -> 7.2"
921
+ fix_effort: low
922
+ paths: [config]
923
+ - id: to_default_s
924
+ pattern: "\\.to_default_s\\b"
925
+ message: "'#to_default_s' on Array, Date, DateTime and Time was removed in Rails 7.2. Use 'to_s'."
926
+ removed_in: "7.2"
927
+ severity: error
928
+ confidence: "High"
929
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-support-removals"
930
+ recategorization: "Rails 7.1 -> 7.2"
931
+ fix_effort: low
932
+ - id: mailer_preview_path
933
+ pattern: "\\bpreview_path\\s*="
934
+ message: "'config.action_mailer.preview_path' was removed in Rails 7.2. Use config.action_mailer.preview_paths << Rails.root.join(\"lib/mailer_previews\").to_s."
935
+ removed_in: "7.2"
936
+ severity: error
937
+ confidence: "High"
938
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#action-mailer-removals"
939
+ recategorization: "Rails 7.1 -> 7.2"
940
+ fix_effort: low
941
+ paths: [config]
942
+ - id: removed_7_2_framework_settings
943
+ pattern: "\\b(?:replace_on_assign_to_many|silence_invalid_content_types_warning|disable_to_s_conversion|remove_deprecated_time_with_zone_name|use_rfc4122_namespaced_uuids|return_only_request_media_type_on_content_type|suppress_multiple_database_warning|enable_dependency_loading)\\s*="
944
+ message: "This setting was removed in Rails 7.2 (replace_on_assign_to_many, silence_invalid_content_types_warning, disable_to_s_conversion, remove_deprecated_time_with_zone_name, use_rfc4122_namespaced_uuids, return_only_request_media_type_on_content_type, suppress_multiple_database_warning or enable_dependency_loading). Delete the line."
945
+ removed_in: "7.2"
946
+ severity: error
947
+ confidence: "High"
948
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#railties-removals"
949
+ recategorization: "Rails 7.1 -> 7.2"
950
+ fix_effort: low
951
+ paths: [config]
952
+ - id: cache_format_version_6_1
953
+ pattern: "\\bcache_format_version\\s*=\\s*6\\.1\\b"
954
+ message: "'config.active_support.cache_format_version = 6.1' was removed in Rails 7.2. Use 7.0 or 7.1; entries written in the 6.1 format are read either way."
955
+ removed_in: "7.2"
956
+ severity: error
957
+ confidence: "High"
958
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-support-removals"
959
+ recategorization: "Rails 7.1 -> 7.2"
960
+ fix_effort: low
961
+ paths: [config]
962
+ - id: show_exceptions_boolean
963
+ pattern: "\\bshow_exceptions\\s*=\\s*(?:true|false)\\b"
964
+ message: "Setting 'config.action_dispatch.show_exceptions' to true or false was removed in Rails 7.2. Use :all (was true), :rescuable, or :none (was false)."
965
+ removed_in: "7.2"
966
+ severity: error
967
+ confidence: "High"
968
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#action-pack-removals"
969
+ recategorization: "Rails 7.1 -> 7.2"
970
+ fix_effort: low
971
+ paths: [config]
972
+ - id: serialize_class_argument
973
+ pattern: "^\\s*serialize\\s*\\(?\\s*:\\w+\\s*,\\s*(?!coder:|type:)(?:::)?[A-Z]"
974
+ message: "Passing a coder or class as the second argument to 'serialize' was removed in Rails 7.2. Use a keyword: serialize :data, coder: JSON or serialize :prefs, type: Hash."
975
+ removed_in: "7.2"
976
+ severity: error
977
+ confidence: "High"
978
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
979
+ recategorization: "Rails 7.1 -> 7.2"
980
+ fix_effort: low
981
+ paths: [app, lib]
982
+ - id: deprecation_singleton
983
+ pattern: "\\bActiveSupport::Deprecation\\.(?!new\\b)\\w+"
984
+ message: "Calling methods on 'ActiveSupport::Deprecation' itself (e.g. ActiveSupport::Deprecation.warn) was removed in Rails 7.2. Use a deprecator: ActiveSupport::Deprecation.new(\"2.0\", \"MyApp\"), registered with Rails.application.deprecators."
985
+ removed_in: "7.2"
986
+ severity: error
987
+ confidence: "High"
988
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-support-removals"
989
+ recategorization: "Rails 7.1 -> 7.2"
990
+ fix_effort: low
991
+ - id: merge_rewhere
992
+ pattern: "\\.merge\\(.*\\brewhere:\\s*true"
993
+ message: "Passing 'rewhere: true' to Relation#merge was removed in Rails 7.2. Drop it; merge now always replaces conditions on the same column."
994
+ removed_in: "7.2"
995
+ severity: error
996
+ confidence: "High"
997
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#active-record-removals"
998
+ recategorization: "Rails 7.1 -> 7.2"
999
+ fix_effort: low
1000
+ paths: [app, lib]
1001
+ - id: assert_enqueued_email_with_args
1002
+ pattern: "\\bassert_enqueued_email_with\\b.*\\bargs:\\s*\\{"
1003
+ message: "Passing mailer params as a hash via ':args' to 'assert_enqueued_email_with' was removed in Rails 7.2. Pass them with 'params:'; 'args:' now takes only the mailer method's arguments."
1004
+ removed_in: "7.2"
1005
+ severity: error
1006
+ confidence: "High"
1007
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#action-mailer-removals"
1008
+ recategorization: "Rails 7.1 -> 7.2"
1009
+ fix_effort: low
1010
+ paths: [test, spec]
1011
+ - id: permissions_policy_removed_directives
1012
+ pattern: "^\\s*\\w+\\.(?:speaker|vibrate|vr)\\b"
1013
+ message: "The 'speaker', 'vibrate' and 'vr' permissions policy directives were removed in Rails 7.2. Delete them from the policy."
1014
+ removed_in: "7.2"
1015
+ severity: error
1016
+ confidence: "Medium"
1017
+ guide_link: "https://guides.rubyonrails.org/7_2_release_notes.html#action-pack-removals"
1018
+ recategorization: "Rails 7.1 -> 7.2"
1019
+ fix_effort: low
1020
+ paths: [config]
1021
+ - id: rails_console_requires_8_0
1022
+ pattern: "\\brequire\\s*\\(?\\s*[\"']rails/console/(?:app|helpers)[\"']"
1023
+ message: "'rails/console/app' and 'rails/console/helpers' were removed in Rails 8.0. Drop the require; Rails loads the console helpers itself."
1024
+ removed_in: "8.0"
1025
+ severity: error
1026
+ confidence: "High"
1027
+ guide_link: "https://guides.rubyonrails.org/8_0_release_notes.html#railties-removals"
1028
+ recategorization: "Rails 7.2 -> 8.0"
1029
+ fix_effort: low
1030
+ - id: rails_console_methods_require
1031
+ pattern: "\\brequire\\s*\\(?\\s*[\"']rails/console/methods[\"']"
1032
+ message: "'rails/console/methods' was removed in Rails 8.1. Drop the require."
1033
+ removed_in: "8.1"
1034
+ severity: error
1035
+ confidence: "High"
1036
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#railties-removals"
1037
+ recategorization: "Rails 8.0 -> 8.1"
1038
+ fix_effort: low
1039
+ - id: sucker_punch_queue_adapter
1040
+ pattern: "\\bqueue_adapter\\s*=\\s*:sucker_punch\\b"
1041
+ message: "Active Job's SuckerPunch adapter was removed in Rails 8.1, and no released sucker_punch (3.3.0 is the latest) ships its own. Use :async, which also runs jobs in-process, or a persisted backend."
1042
+ removed_in: "8.1"
1043
+ severity: error
1044
+ confidence: "High"
1045
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-job-removals"
1046
+ recategorization: "Rails 8.0 -> 8.1"
1047
+ fix_effort: low
1048
+ - id: to_time_preserves_timezone_false
1049
+ pattern: "\\bto_time_preserves_timezone\\s*=\\s*false\\b"
1050
+ message: "'to_time_preserves_timezone = false' stopped working in Rails 8.1: to_time now always preserves the receiver's timezone instead of the system local time. Check code that relies on local time, then delete the setting (it's deprecated)."
1051
+ removed_in: "8.1"
1052
+ severity: error
1053
+ confidence: "High"
1054
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-support-removals"
1055
+ recategorization: "Rails 8.0 -> 8.1"
1056
+ fix_effort: low
1057
+ - id: rails_update_tasks
1058
+ pattern: "\\brails:(?:update(?::configs|:bin)?|template(?::copy)?)\\b"
1059
+ message: "The 'rails:update' and 'rails:template' tasks were removed in Rails 5.1. Use 'bin/rails app:update' and 'bin/rails app:template'."
1060
+ removed_in: "5.1"
1061
+ severity: error
1062
+ confidence: "High"
1063
+ guide_link: "https://guides.rubyonrails.org/5_1_release_notes.html#railties-removals"
1064
+ recategorization: "Rails 5.0 -> 5.1"
1065
+ fix_effort: low
1066
+ files: [code, scripts]
1067
+ - id: rake_routes_notes_tasks
1068
+ pattern: "\\brake\\s+(?:routes|notes(?::\\w+)?|initializers|dev:cache)\\b"
1069
+ message: "'rake routes', 'rake notes', 'rake initializers' and 'rake dev:cache' were removed in Rails 6.1. Use the Rails commands: 'bin/rails routes', 'bin/rails notes', and so on."
1070
+ removed_in: "6.1"
1071
+ severity: error
1072
+ confidence: "High"
1073
+ guide_link: "https://guides.rubyonrails.org/6_1_release_notes.html#railties-removals"
1074
+ recategorization: "Rails 6.0 -> 6.1"
1075
+ fix_effort: low
1076
+ files: [code, scripts]
1077
+ - id: rake_stats
1078
+ pattern: "\\brake\\s+stats\\b"
1079
+ message: "'bin/rake stats' was removed in Rails 8.1. Use 'bin/rails stats'."
1080
+ removed_in: "8.1"
1081
+ severity: error
1082
+ confidence: "High"
1083
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#railties-removals"
1084
+ recategorization: "Rails 8.0 -> 8.1"
1085
+ fix_effort: low
1086
+ files: [code, scripts]
1087
+ - id: cable_evented_redis
1088
+ pattern: "^\\s*adapter:\\s*[\"']?evented_redis\\b"
1089
+ message: "Action Cable's 'evented_redis' adapter was removed in Rails 5.2. Use adapter: redis."
1090
+ removed_in: "5.2"
1091
+ severity: error
1092
+ confidence: "High"
1093
+ guide_link: "https://guides.rubyonrails.org/5_2_release_notes.html#action-cable-removals"
1094
+ recategorization: "Rails 5.1 -> 5.2"
1095
+ fix_effort: low
1096
+ files: [yaml]
1097
+ paths: [config/cable.yml]
1098
+ - id: sqlite3_retries
1099
+ pattern: "^\\s*retries:\\s*\\S"
1100
+ message: "The SQLite3 adapter's 'retries' option was removed in Rails 8.1. Use timeout: (milliseconds) instead."
1101
+ removed_in: "8.1"
1102
+ severity: error
1103
+ confidence: "High"
1104
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-record-removals"
1105
+ recategorization: "Rails 8.0 -> 8.1"
1106
+ fix_effort: low
1107
+ files: [yaml]
1108
+ paths: [config/database.yml]
1109
+ - id: azure_storage_service
1110
+ pattern: "^\\s*service:\\s*[\"']?AzureStorage\\b"
1111
+ message: "Active Storage's Azure service (service: AzureStorage) was removed in Rails 8.1. Move to the azure-blob gem, which provides a replacement service (it isn't maintained by the Rails team)."
1112
+ removed_in: "8.1"
1113
+ severity: error
1114
+ confidence: "High"
1115
+ guide_link: "https://guides.rubyonrails.org/8_1_release_notes.html#active-storage-removals"
1116
+ recategorization: "Rails 8.0 -> 8.1"
1117
+ fix_effort: low
1118
+ files: [yaml]
1119
+ paths: [config/storage.yml]