Closed daniel-de-wit closed 11 months ago
Hi @daniel-de-wit, Thanks, I'll take a look.
@staudenmeir I've updated the PR to make the service provider deferred, just like the one from IDEHelper. This ensures the order of package discovery doesn't effect the registration of the model hook. Now it only registers after the ModelsCommand is requested from the service container, which removed the need for a couple of environment guards.
I would like to hear your take on it
Thanks, excellent PR! I've released a new version.
One last question: You kept and even improved the README section about manually enabling the model hook.
Do you still see a use case for that?
I added that for people that have package discovery disabled. I never encountered a project that disabled the entire package discovery though.
Ok, thanks.
Would you consider automatically registering the model hook using Package Discovery?