summaryrefslogtreecommitdiff
path: root/DOC_CHANGES.md
diff options
context:
space:
mode:
Diffstat (limited to 'DOC_CHANGES.md')
-rw-r--r--DOC_CHANGES.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/DOC_CHANGES.md b/DOC_CHANGES.md
index 629ff147c2..b5eb124f26 100644
--- a/DOC_CHANGES.md
+++ b/DOC_CHANGES.md
@@ -14,12 +14,16 @@ automatically. Instead, `resource_name` is required in order to have DSL:
```ruby
module MyModule
class MyResource < Chef::Resource
- resource_name :my_resource
- provides :some_other_name, os: 'linux' # A second resource DSL, only on linux
+ use_automatic_resource_name # Names the resource "my_resource"
end
end
```
+`resource_name :my_resource` may be used to explicitly set the resource name.
+
+`provides :my_resource`, still works, but at least one resource_name *must* be
+set for the resource to work.
+
Authors of HWRPs need to be aware that in the future all resources and providers will be required to include a provides line. Starting with Chef 12.4.0 any HWRPs in the `Chef::Resource` or `Chef::Provider` namespaces that do not have provides lines will trigger deprecation warning messages when called. The LWRPBase code does `provides` automatically so LWRP authors and users who write classes that inherit from LWRPBase do not need to explicitly include provides lines.
Users are encouraged to declare resources in their own namespaces instead of putting them in the special `Chef::Resource` namespace.