Skip to content

Conversation

viicslen
Copy link

This pull request refines the automatic discovery logic for various components within the modules. The changes introduce more flexibility by allowing users to specify which components should be automatically discovered and registered.

When decoupling modules to separate packages the autodiscover logic has to be implemented into the package itself so for my use case it's better to have autodiscovery disabled by default and implemented in the package through service prividers and the extra key in composer.json. This way, modules can be converted into packages at any time without any extra changes needed

@viicslen
Copy link
Author

viicslen commented May 14, 2024

Another possible change would be adding merging the should_discover_events configuration with the one added in this PR

@mortenscheel
Copy link

I'm new to this package, so please let me know if I've misunderstood something.

If automatic discovery was disabled, and I registered everything myself in the service providers, would I be able to use this package purely as a dev-dependency? I would like to be able to use all the nice artisan commands during development, but not have the package installed in production.

@calebdw
Copy link

calebdw commented May 13, 2025

Yes, this is important. I noticed on the draft v3 branch that it's now caching the autodiscovered files (so this alleviates my primary concern), but on v2 I want to disable autodiscovery so that I can implement discovery with caching for performance improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants