[6.x] add event after all plugins are booted #18962
-
Edit:after a bit of tweaking we can actually use $this->app->booted(fn() => /* do something */);However I can imagine it might be unintuitive for developers during migration to find that solution, so I would still let this idea open as a "nice to have in the Craft 6 docs". It might be worth to think about dispatching your PluginsLoaded after the application is fully booted as well to make the migration from Craft 5 to Craft 6 easier. Original Post:It would be awesome to have an Lines 287 to 289 in 61ef988 I know there is a Line 253 in 97f4e4e However this is called before the bootstrap process of each plugin, so by the time public function __construct($app)
{
Event::listen(PluginsLoaded::class, $listener);
parent::__construct($app);
}And even then this is mostly of no use since nothing has really happened at this point. As of now the current implementation of An additional event when they are all ready to use would be awesome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Craft 6.0.0-alpha.5 is out with the changes discussed in #18973. Thanks for the feedback! |
Beta Was this translation helpful? Give feedback.
Craft 6.0.0-alpha.5 is out with the changes discussed in #18973. Thanks for the feedback!