-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prep rails upgrades #8528
Merged
Merged
Prep rails upgrades #8528
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ignore files and directories which either have unusal inflections or can't be autoloaded by Zeitwerk. In the upcoming Rails upgrades Zeitwerk will attempt to load everything in lib at boot so we need to add these exceptions.
This fixes an exception in Rails 7.1 when using fixture sets: NameError: uninitialized constant ActiveRecord::FixtureSet::ClassCache
In Rails 7.1 it will require a default ActiveStorage service to be defined. This adds a service for the test environment so test examples don't break when we bump the Rails gem. This commit ensures the tests can be run on future bump commit. The other environments will be defined when we run `rails app:update`.
When migrating a new database under Rails 7.1 this migration breaks due to a new constraint ensuring enums have a database backed column. Our `Note#style` was added in a later migration so doesn't exist yet. Recreating the Note class without the enum defined allows full migration to succeed.
Ensure we are matching strings with strings. In Rails 7.1 this will return an `ActionView::OutputBuffer`.
Once `action_controller.raise_on_missing_callback_actions` is enabled we will see exceptions due to the `signin` action not existing.
Sometimes we need locales to be loaded before the application has been initialised. Setting in the in `config.before_configuration` block doesn't persist correctly and also needs to be called in after initialisation. This issue becomes apparent when there is an exception at boot. The error message might call `to_sentence` [1], which will attempt to load a translation and this then error if `set_locales` hasn't been called. [1]: https://github.com/rails/rails/blob/d39db5d/activestorage/lib/active_storage/service/registry.rb#L18-L19 See #5382
Ensure data can be retrieved via symbol keys. When enabling the Rails 7.1 framework default data will be returned with string keys.
So these helpers are available to files which aren't loaded via Zeitwerk such as the poller and text masker.
This config has changed in Rails 7.1 to allow multiple paths to be defined.
Fixes `PG::SyntaxError` exception when upgrading to Rails 7.2.
In Rails 8 you have to set `active_job.queue_adapter`. This change sets it back to the default value in Rails 7.x.
Rails 8 adds additional route validation so this raise an exception.
Switch to positional arguments instead of keyword arguments. This fixes deprecation warning when upgrading to Rails 7.2.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant issue(s)
#8515 #8517 #8527
What does this do?
Minor changes needed to make the upgrade from Rails 7.0 to 8.0 smoother.
[skip changelog]