I'm currently developing an app using Symfony and I would like to implement a user-friendly plugin system. However, I'm not referring to the Symfony concept of "bundles" in this case. My idea revolves around having a designated "plugins" directory where each plugin extends a base class. This base class would handle the plugin registration in the database, manage routing URLs, and store plugin configurations that can be enabled or disabled through an admin interface. Additionally, plugins would have their own controllers, which could potentially extend a specialized PluginController or similar class, as well as self-contained service classes and functions. The responsibility of the Symfony app would be to load these plugins and invoke them when a matching route is encountered.
In addition to these requirements, I also aim for plugins to be capable of registering event listeners and accessing core services through dependency injection. However, I'm facing difficulties finding existing examples or resources showcasing such an architecture within Symfony apps. The general assumption tends to lean towards extending apps using the bundle system instead.
If anyone has valuable insights, tips, or relevant experiences to share, I would greatly appreciate it. Thank you.