-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: move plugin system to dedicated package #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b9b9688
to
afa170e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
composer.lock
is excluded by!**/*.lock
📒 Files selected for processing (20)
.gitignore
(1 hunks)app/Console/Commands/Plugin/DisableCommand.php
(0 hunks)app/Console/Commands/Plugin/DiscoverCommand.php
(0 hunks)app/Console/Commands/Plugin/EnableCommand.php
(0 hunks)app/Console/Commands/Plugin/InfoCommand.php
(0 hunks)app/Console/Commands/Plugin/InstallCommand.php
(0 hunks)app/Console/Commands/Plugin/ListCommand.php
(0 hunks)app/Console/Commands/Plugin/PluginCommand.php
(0 hunks)app/Providers/AppServiceProvider.php
(2 hunks)app/Providers/PluginServiceProvider.php
(0 hunks)app/Services/PluginManager.php
(0 hunks)composer.json
(2 hunks)config/app.php
(1 hunks)plugins/example/composer.json
(0 hunks)plugins/example/plugin.json
(0 hunks)plugins/example/routes/api.php
(0 hunks)plugins/example/src/ExampleServiceProvider.php
(0 hunks)plugins/example/src/Http/Controllers/ExampleController.php
(0 hunks)tests/Feature/Plugin/PluginCommandsTest.php
(0 hunks)tests/Feature/Plugin/PluginManagerTest.php
(0 hunks)
💤 Files with no reviewable changes (16)
- app/Providers/PluginServiceProvider.php
- plugins/example/plugin.json
- app/Console/Commands/Plugin/EnableCommand.php
- plugins/example/composer.json
- plugins/example/src/Http/Controllers/ExampleController.php
- app/Console/Commands/Plugin/DisableCommand.php
- plugins/example/src/ExampleServiceProvider.php
- app/Console/Commands/Plugin/InstallCommand.php
- plugins/example/routes/api.php
- app/Console/Commands/Plugin/ListCommand.php
- app/Console/Commands/Plugin/DiscoverCommand.php
- app/Console/Commands/Plugin/InfoCommand.php
- app/Console/Commands/Plugin/PluginCommand.php
- tests/Feature/Plugin/PluginCommandsTest.php
- tests/Feature/Plugin/PluginManagerTest.php
- app/Services/PluginManager.php
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Run Tests
🔇 Additional comments (6)
.gitignore (1)
20-22
: Verify that ignoring the entire/plugins
directory is really what you wantThe new engine usually keeps first-party plugins inside
plugins/
while shipping its own code viavendor/
.
Completely ignoring the folder means any in-house plugins (or stub templates committed for CI) will never reach the repo.
If that is intentional (runtime-only or external distribution) ‑ great, otherwise consider a more granular rule (e.g.plugins/*/vendor
).app/Providers/AppServiceProvider.php (2)
6-6
: Import looks fine but may be redundantIf
whilesmart/laravel-plugin-engine
exposes its provider through Composer auto-discovery (most Laravel packages do), the explicit import/registration becomes a double-register risk.
15-15
: Double-registration risk – confirm the package is NOT auto-discoveredCalling
$this->app->register(PluginServiceProvider::class);is only necessary when the package is excluded from auto-discovery via
extra.laravel.dont-discover
.
If it is still auto-discoverable, this manual call will execute the provider twice, potentially registering bindings, routes or event listeners twice.Action: Check
vendor/whilesmart/laravel-plugin-engine/composer.json
(or the repo stub) for anextra.laravel.providers
section. Remove this line or opt-out viadont-discover
to avoid duplication.config/app.php (1)
19-19
: App name change acknowledgedNo functional impact; just ensure any automated e-mails or notifications depending on the value are covered by tests.
composer.json (2)
23-25
: Un-pinned@dev
dependency can break CI reproducibilityDepending on the moving
@dev
tip means everycomposer install
can pull arbitrary new commits.
Pin to a specific branch name (dev-main
) or a commit hash using the"as"
syntax to keep builds deterministic.
73-75
:openapi:plugins
script may fail ifplugins/
directory is absentThe script calls:
./vendor/bin/openapi app plugins --debug ...
openapi
treats each positional argument as a path. Ifplugins/
is ignored and missing in CI containers the command exits non-zero, breaking the pipeline.Option A: add a guard like
test -d plugins && ...
;
Option B: point it to the engine’s plugin path (e.g.storage/plugins
) if that’s where plugins end up.
afa170e
to
3763457
Compare
- Moved plugin system to whilesmart/laravel-plugin-engine package - Updated AppServiceProvider to use the new package's service provider - Removed old plugin system files that were moved to the package - Updated composer.json to require the new package - Cleaned up cached configuration files
3763457
to
e50beb5
Compare
Uh oh!
There was an error while loading. Please reload this page.