expose
expose copied to clipboard
Correctly load plugins, even in sub-directories.
Previously, any files in ~/.expose/plugins directory was loaded as a plugin.
Now, README.md files are excluded.
Also, the plugin can be in a sub-folder. This means we can do something like:
git clone custom-expose-plugin.git
in the plugins folder and it will work
Anything missing for this PR to be merged ?
While I like the idea - especially with cloning custom plugins with git, a few thoughts on this:
The changes break backward compatibility for existing plugin setups. Specifically, custom plugins in
~/.expose/pluginsare no longer detected, e.g. created byexpose make:plugin.For a fundamental change to the plugin system, we need:
- Unit tests to verify both new and existing functionality
- Updated documentation explaining the new plugin requirements and structure
- Preservation of backward compatibility for existing plugin setups
I can work on that next week. Once the code is completed. I will add the tests and documentation. Didn't want to spend time on that if the PR would have been rejected.
@mechelon I don't see how plugins in the ~/.expose/plugins are no longer detected.
I didn't changed which folders are scanned. I only added some additional checkup:
- must be a php file
- php class must extend the plugin class
Expose\Client\Logger\Plugins\BasePlugin
this shouldn't have any impact on existing plugins. And expose make:plugin should still work since it should create plugins correctly in the folder.
Can you explain to me what I did wrong so I can fix it ?