dry-rb / dry-transaction

Business transaction DSL
http://dry-rb.org/gems/dry-transaction
MIT License
468 stars 55 forks source link

Warning: Using the last argument as keyword parameters is deprecated #132

Closed rinaldifonseca closed 3 years ago

rinaldifonseca commented 4 years ago

Steps to reproduce

Expected behavior

Actual behavior

Warning: /Users/jow/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/dry-transaction-0.13.0/lib/dry/transaction/instance_methods.rb:17: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /Users/jow/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/dry-transaction-0.13.0/lib/dry/transaction/instance_methods.rb:84: warning: The called method `resolve_operation' is defined here

I found the post below and using the hash splat(**operations) in the line 17 of lib/dry/transaction/instance_methods.rb fixed the warning. Is this the path to follow?

https://piechowski.io/post/last-arg-keyword-deprecated-ruby-2-7/

milushov commented 3 years ago

I have also this warning:

/Users/fuck/.rvm/gems/ruby-2.7.1/gems/dry-transaction-0.13.0/lib/dry/transaction/instance_methods.rb:84: warning: The called method `resolve_operation' is defined here
trammel commented 3 years ago

This is now a breaking problem on the released ruby 3.0.0

colszowka commented 3 years ago

Note there seems to be a PR that fixes the deprecations at https://github.com/dry-rb/dry-transaction/pull/134. Would be very nice to get this resolved, thank you!

timriley commented 3 years ago

I'll take a look at this in the next day or two, thanks folks.

timriley commented 3 years ago

This is fixed via #134 and released in 0.13.1