Closed adamleff closed 7 years ago
👍
although now that i see this, i'm suspecting that other users out there may have overloaded the name property to introduce validations.
this is still the right thing to do here and should be merged, but i'm not sure the chef/chef PR should be merged...
In chef/chef#5606, Chef will now log deprecation warnings whenever a resource defines a property that is already an instance_method on that resource. If this happens, a user may be inadvertently causing unexpected and difficult-to-troubleshoot behavior.
A number of the cheffish resources were defining a
name
property which is already a property defined on the Chef::Resource base class. This change stops defining thename
property for each of these resources and instead defines something unique.In addition, the
chef_mirror
resource defined afreeze
property which is already an instance_method onObject
instances. I have changed that to befreeze_on_upload
and defined a method to log a deprecation warning while providing backward compatibility.