55
66- Fix CSRF forgery protection bypass for Spree::OrdersController#populate [ GHSA-h3fg -h5v3-vf8m] ( https://github.com/solidusio/solidus/security/advisories/GHSA-h3fg-h5v3-vf8m )
77
8- ** Other important changes**
8+ ### Other important changes
9+
10+ #### No more autoload of decorators in fresh applications
911
1012New Solidus applications won't autoload files matching ` app/**/*_decorator*.rb `
1113pattern anymore. For previous Solidus applications, it's something that will
@@ -43,7 +45,7 @@ of Solidus recommendations (that files are monkey patches; they don't use the
4345you can place those files in ` app/overrides/ ` and remove the ` decorator `
4446suffix.
4547
46- ### Changes to the promotion system
48+ #### Changes to the promotion system
4749
4850Promotions with a ` match_policy ` of ` any ` are deprecated. If you have promotions
4951with such a match policy, try running the following rake task:
@@ -64,6 +66,43 @@ set a temporary flag in your `config/initializers/spree.rb` file:
6466config.allow_promotions_any_match_policy = true
6567```
6668
69+ #### Static preference sources configured within ` .to_prepare ` blocks
70+
71+ [ Rails 7 no longer supports referring autoloadable classes within an
72+ initializer] ( https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoload-on-boot-and-on-each-reload ) .
73+
74+ Because of that, we need to change the way we configure static preference sources.
75+
76+ Before:
77+
78+ ``` ruby
79+ # config/initializers/spree.rb
80+ Spree .config do |config |
81+ config.static_model_preferences.add(
82+ AmazingStore ::AmazingPaymentMethod ,
83+ ' amazing_payment_method_credentials' ,
84+ credentials: ENV [' AMAZING_PAYMENT_METHOD_CREDENTIALS' ],
85+ server: Rails .env.production? ? ' production' : ' test' ,
86+ test_mode: ! Rails .env.production?
87+ )
88+ end
89+ ```
90+
91+ Now:
92+
93+ ``` ruby
94+ # config/initializers/spree.rb
95+ Rails .application.config.to_prepare do
96+ Spree ::Config .static_model_preferences.add(
97+ AmazingStore ::AmazingPaymentMethod ,
98+ ' amazing_payment_method_credentials' ,
99+ credentials: ENV [' AMAZING_PAYMENT_METHOD_CREDENTIALS' ],
100+ server: Rails .env.production? ? ' production' : ' test' ,
101+ test_mode: ! Rails .env.production?
102+ )
103+ end
104+ ```
105+
67106### Core
68107
69108- Add configuration option for ` migration_path ` [ #4190 ] ( https://github.com/solidusio/solidus/pull/4190 ) ([ SuperGoodSoft] ( https://github.com/supergoodsoft/ ) )
0 commit comments