Plugins and processors install/uninstall processes
In certain use cases, a plugin or processor may need a custom DB table or new column in an existing table to maintain data that it uniquely needs.
This defines certain certain requirements and will define a major part of core update and admin tasks:
- we need an automated install/uninstall function that can be called.
- there are 2 possibilities here:
- user installs by composer and then triggers a master install/uninstall process. This will loop through all plugins/processors and detect whether the process has been called - if not, it will run the process. PROBLEM: how to detect uninstall?
- (see Drupal/Wordpress workflow) user installs by composer. The processor/plugin will not be activated at this stage. The admin can see a list of plugins/processors in a new GUI page, and when they click on activate/deactivate, the respective process will be called and the plugin marked as active or inactive.
- there are 2 possibilities here:
The latter option may be the most suitable. It raises another question...
Where would the uninstall functions exist? How do we separate plugins/3rd party processors from core?
- Separate namespaces
- The presence of install/uninstall methods in the main class
- Functions in a separate PHP file
Edited by laughing man