Skip to content
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

Address Deprecation Warnings #3449

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Address Deprecation Warnings #3449

merged 2 commits into from
Sep 5, 2024

Conversation

aaronskiba
Copy link
Contributor

This PR addresses the following deprecation warnings (the warnings were encountered when executing bundle exec rspec):

  1.  DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. 
     (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack- 
     7.1.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:43)
    
  2. Added coder: and type: keywords in various places

    Example warning (before adding type: keyword in app/models/user.rb:

    Please pass the class as a keyword argument:
    
    serialize :prefs, type: Hash
    (called from <class:User> at /path/to/app/models/user.rb:73)
    DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 
    7.2.
    

Added `coder:` and `type:` keywords in various places to address deprecation warnings.

Example warning (before adding `type: ` keyword in `app/models/user.rb`:
````
Please pass the class as a keyword argument:

  serialize :prefs, type: Hash
 (called from <class:User> at /path/to/app/models/user.rb:73)
DEPRECATION WARNING: Passing the class as positional argument is deprecated and will be removed in Rails 7.2.
```
This change addresses the following deprecation warnings:
```
DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/debug_exceptions.rb:43)
DEPRECATION WARNING: Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead. (called from rescue in call at /usr/share/rvm/gems/ruby-3.0.5@upstream/gems/actionpack-7.1.3.4/lib/action_dispatch/middleware/show_exceptions.rb:36)
```
Copy link

github-actions bot commented Sep 4, 2024

</tr>
1 Error
🚫

Please include a CHANGELOG entry.

You can find it at [CHANGELOG.md](https://github.com/DMPRoadmap/roadmap/blob/main/CHANGELOG.md).

Generated by 🚫 Danger

@aaronskiba
Copy link
Contributor Author

Some of the PostgreSQL tests are failing, but that is independent of these PR changes. Those failing tests are addressed here in the following PR: #3451

@aaronskiba aaronskiba merged commit f25763c into rails7 Sep 5, 2024
6 of 9 checks passed
@aaronskiba aaronskiba deleted the aaron/rails7-copy branch September 5, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants