Open edalzell opened 2 weeks ago
I'm unable to reproduce this with a fresh site & addon. 🤔
What does your addon's ServiceProvider
look like?
Oh I bet it has something to with the fact I load a bunch of service providers in the composer.json
:
Yup, 9 service providers and it's called 9 times
Do all of those service providers extend Statamic's AddonServiceProvider
?
Do all of those service providers extend Statamic's
AddonServiceProvider
?
Yes they do, because they have tags etc and I want them loaded.
Okay! We can probably provide a way to opt-out of auto registration then.
Okay! We can probably provide a way to opt-out of auto registration then.
How will that help? I only have ONE update script at the correct relative location, why is that one getting called for the other service providers?
For the record: we've chatted this out on Slack. Instead of autoloading based on the addon's path, we can use the service provider's path.
Bug description
Our addon's updater gets called many times:
How to reproduce
Run
composer dump-autoload
when your add-on's updater looks like:It's using the auto-loading that was recently added.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response