Steps to reproduce
Have a app on 7.2 with ActiveStore set up, upgrade to 8.0, and run app:update
Expected behavior
No deprecation warnings
Actual behavior
$ bin/rails app:update
...
rails active_storage:update
DEPRECATION WARNING: `to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`. (called from <top (required)> at /home/user/code/reverser/config/environment.rb:5)
DEPRECATION WARNING: `to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1. To opt in to the new behavior, set `config.active_support.to_time_preserves_timezone = :zone`. (called from <top (required)> at /home/user/code/reverser/config/environment.rb:5)
active_storage:update seems to load the environment, which causes some initializers to run, include the one for assigning to_time_preserves_timezone. There is code to silence warnings:
|
silence_warnings do |
|
::Rails::Command.invoke(command, args, **options) |
|
end |
so I would say that deprecations are unexpected. However I did not easily find a way to silence deprecations in that block. The deprecators are only available
after/sometime during the command.
Rails.logger is also not yet set up.
Steps to reproduce
Have a app on 7.2 with ActiveStore set up, upgrade to 8.0, and run
app:updateExpected behavior
No deprecation warnings
Actual behavior
active_storage:updateseems to load the environment, which causes some initializers to run, include the one for assigningto_time_preserves_timezone. There is code to silence warnings:rails/railties/lib/rails/generators/actions.rb
Lines 396 to 398 in ff770ee
so I would say that deprecations are unexpected. However I did not easily find a way to silence deprecations in that block. The deprecators are only available after/sometime during the command.
Rails.loggeris also not yet set up.