Replies: 1 comment 1 reply
-
I like the attribute approach. Simple, clear and easy to implement 👍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm finding over at Laravel Rector that we have more use for sets as a repository based around a framework. We'll need to start documenting sets more to add value to those wanting to start using them with Rector. That said there's no automated mechanism to document the set as there is to document rules.
I thought it might be a good idea to bring up the topic here as it could be useful for all Rector based repos.
My idea is keeping it simple such as using attributes for the \Closures returned by sets.
My other idea would be to start returning anonymous class invokables instead of \Closures that could implement and interface to describe the set.
Then it would just be a case of scanning certain folders to generate the documentation into a markdown document in a similar way to how the rules are.
Was curious of the community's thoughts?
Beta Was this translation helpful? Give feedback.
All reactions