Skip to content

Conversation

felabrecque
Copy link

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

@felabrecque
Copy link
Author

Anything missing for this PR to be merged ?

@mechelon mechelon self-requested a review April 2, 2025 10:17
@mechelon mechelon changed the base branch from master to dev April 4, 2025 14:00
Copy link
Collaborator

@mechelon mechelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I like the idea - especially with cloning custom plugins with git, a few thoughts on this:

  1. The changes break backward compatibility for existing plugin setups. Specifically, custom plugins in ~/.expose/plugins are no longer detected, e.g. created by expose make:plugin.

  2. 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

@mechelon mechelon added the enhancement New feature or request label Apr 4, 2025
@felabrecque
Copy link
Author

felabrecque commented Apr 4, 2025

While I like the idea - especially with cloning custom plugins with git, a few thoughts on this:

  1. The changes break backward compatibility for existing plugin setups. Specifically, custom plugins in ~/.expose/plugins are no longer detected, e.g. created by expose make:plugin.

  2. 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.

@felabrecque
Copy link
Author

felabrecque commented Apr 4, 2025

@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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants