Auto-registering trait in addon service provider
It might be cool to include a trait in the addon service provider stub to auto-register fieldtypes/filters/tags/etc. for the user. If the trait is used, the service provider would loop through the appropriate folders, loop over the files, and auto-register everything. If it's too magical for a user, they can remove the use trait statement.
My thought is this... In Laravel, so many times I’ve developed a policy and forgot to register it, only to waste 5 minutes fumbling before realizing. I think I remember a tweet where Taylor said he was working on a convention to auto-register policies with models using a naming convention? That said, there are other things in Laravel that will always require registering, like middleware.
Pros: Make it easier for new users to develop for marketplace. Remove that extra mental step that some people might forget.
Cons: Development time? Any others?
😊
Oh, here's that tweet I mentioned: https://twitter.com/taylorotwell/status/1078494087525908481
Only con I see is development time. We can loop back once were at 3.0 🤘