Deprecate `Utils::String` and `Utils::Hash` instance methods
jodosha opened this issue · 0 comments
jodosha commented
- Use
Hanami::Utils::Deprecation
for the purpose - The deprecation warning should indicate the corresponding class method to use
- Handle
#singularize
and#pluralize
w/o specifying the corresponding class method to use. AsUtils::String.singularize
and.pluralize
will be removed in 2.0. - Handle
method_missing
w/o specifying the corresponding class method to use - Handle methods that belong to
::String
(from Ruby) w/o specifying the corresponding class method to use. Eg.Hanami::Utils::String#gsub
is defined in our gem only for performance reasons. - Check all the occurrences in all the Hanami gems (
develop
branches) and use the proper class method
Use the develop
branch for this enhancement.
Examples
This is for a method that is provided by Utils::String
:
"Hanami::Utils::String#underscore is deprecated, please use Hanami::Utils::String.underscore"
This is for a method that is provided by ::String
(eg. #gsub
or #method_missing
:
"Hanami::Utils::String is deprecated as type, it will be turned into a module into Hanami 2.0"
Ref https://trello.com/c/dUwUfWrW
Ref https://trello.com/c/nJhd5awo
Ref #267