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

Renamed setting dsl method key to setting #182

Closed
wants to merge 1 commit into from

Conversation

choallin
Copy link

@choallin choallin commented Jul 5, 2021

@timriley mentioned in the ticket 166 that the setting DSL method key should be renamed to setting, which is done in this pr

@choallin choallin requested a review from solnic as a code owner July 5, 2021 14:47
Copy link
Member

@solnic solnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this. I left one small suggestion.

schema[name] = type
end
alias :key :setting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's actually a deprecate macro in Deprecations extension that you could use here https://github.com/dry-rb/dry-core/blob/master/lib/dry/core/deprecations.rb#L152-L157

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your hint!
Since the DSL class is inheriting from BasicObject and is not including any Dry module I don't have access to the deprecate call. Can you point me to a case where there is a similar case so I can take a look on how to do this?

Copy link
Contributor

@wuarmin wuarmin Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out

extend Dry::Core::Deprecations["Dry::System::Container"]

Extend from Dry:Core:Deprecations and then use deprecate instead of alias.

Best regards ;-)

@timriley
Copy link
Member

Thanks for taking a run at this, @choallin! In the end this got addressed as part of a whole overhaul of the bootable components providers in #202, so this is fixed now 😄

@timriley timriley closed this Jan 13, 2022
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.

None yet

4 participants