Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Plugin Manager Laravel Package

fresns/plugin-manager

Laravel plugin manager for building modular, scalable apps. Treat each plugin as an independent mini-app with its own views, controllers, and models. Supports PHP 8+ and Laravel 9–13, with simple Composer install and optional config publishing.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel 13.x Compatibility: The package now officially supports Laravel 13.x, aligning with its latest conventions (e.g., Bootloaders, App Context, and Improved Dependency Injection). This enables seamless integration with Laravel’s evolving architecture while maintaining backward compatibility with Laravel 9–12.
  • Bootloader Integration: Leverages Laravel 13’s Bootloaders for plugin-specific bootstrapping, reducing manual service provider registration. Plugins can now define Bootloaders for lazy-loading critical dependencies (e.g., database connections, event listeners) without impacting core app performance.
  • App Context Support: Plugins can now utilize Laravel 13’s App Context to scope configurations, middleware, and routes dynamically (e.g., app()->context('blog')->use(...)), improving modularity for multi-tenant or feature-flagged plugins.
  • Improved Dependency Injection: Enhanced support for constructor injection and autowiring in plugins, reducing boilerplate for dependency management (e.g., public function __construct(private BlogRepository $repository)).

Integration Feasibility

  • Zero-Coupling Bootloaders: Plugins can now register custom bootloaders (e.g., BlogServiceBootloader) to defer initialization until first use, further optimizing boot time.
  • Dynamic Configuration: Plugins can publish context-aware configurations (e.g., config('plugins.blog')) that adapt to the current Laravel context (e.g., API vs. web).
  • Enhanced Asset Handling: Improved integration with Laravel 13’s Asset Pipeline (e.g., Vite 4+), allowing plugins to compile assets independently with versioned paths (e.g., /plugins/blog/assets/v1.2.3.css).
  • Event System Updates: Plugins can now listen to Laravel 13’s new event system (e.g., App\Events\PluginEvent) with stronger typing and better performance.

Technical Risk

  • Bootloader Learning Curve: Teams unfamiliar with Laravel 13’s Bootloaders may face a steeper adoption curve, particularly for plugins requiring complex initialization logic.
  • Context Migration: Existing plugins using global configurations (e.g., config('plugin.blog')) may need updates to leverage App Context for dynamic scoping, requiring refactoring.
  • Performance Implications:
    • Bootloader Overhead: While Bootloaders reduce boot time, lazy-loaded plugins may introduce cold-start latency for first requests (mitigated by caching).
    • Context Switching: Frequent context changes (e.g., per-request) could add minimal overhead (~1–5ms) if not optimized.
  • Tooling Gaps:
    • IDE Support: Laravel 13’s Bootloaders may not yet have full PhpStorm/VSCode autocompletion for plugin-specific classes.
    • Debugging: Stack traces for Bootloader-initialized plugins may require additional configuration to trace plugin origins.

Key Questions

  1. Laravel 13 Adoption:
    • Is the team ready to migrate to Laravel 13, or should plugins remain compatible with older versions (e.g., via feature flags)?
    • How will Bootloader-based plugins be tested in CI (e.g., does the test environment support lazy-loading)?
  2. Context Strategy:
    • Should plugins use App Context for dynamic scoping (e.g., per-tenant, per-feature), or stick to static configurations for simplicity?
    • How will cross-context dependencies (e.g., Plugin A needing Plugin B’s context) be managed?
  3. Asset Pipeline:
    • Will plugins use Vite 4+ for asset compilation, or continue with Laravel Mix for broader compatibility?
    • How will asset versioning be handled for plugins (e.g., cache-busting, CDN invalidation)?
  4. Backward Compatibility:
    • Are there plans to deprecate legacy plugin registration (e.g., PluginServiceProvider) in favor of Bootloaders?
    • How will Laravel 12 plugins be migrated to Laravel 13 without breaking changes?
  5. Performance Optimization:
    • Should critical plugins be pre-loaded (e.g., via config('plugins.preload')) to avoid cold starts?
    • Are there plans to add plugin-specific caching layers (e.g., Redis) to reduce Bootloader overhead?

Integration Approach

Stack Fit

  • Laravel 13.x: Fully compatible with Laravel 13’s Bootloaders, App Context, and Improved DI, enabling modern plugin architectures.
  • PHP 8.2+: Leverages enums, readonly properties, and attributes for cleaner plugin metadata (e.g., [AsPlugin]).
  • Vite 4+: Native support for plugin-specific asset pipelines with ESBuild or Webpack.
  • Database: Continues to support shared/isolated schemas via Laravel’s migration system and query builder.

Migration Path

  1. Assessment Phase:
    • Audit plugins for Bootloader compatibility (e.g., replace PluginServiceProvider with Bootloader where applicable).
    • Identify context-dependent configurations (e.g., API vs. web) and plan migrations.
  2. Pilot Plugin:
    • Convert a non-critical plugin (e.g., "Newsletter") to use Bootloaders and App Context.
    • Test lazy-loading and asset compilation in staging.
  3. Core App Refactoring:
    • Replace global plugin configs with context-aware configs (e.g., app()->context('admin')->use(...)).
    • Update dependency injection to use constructor injection (e.g., public function __construct(private PluginRepository $repo)).
  4. Dependency Management:
    • Use Composer’s replace to manage plugin versions (e.g., composer require vendor/plugin:^3.4.0).
    • Publish plugin-specific configs via php artisan vendor:publish --plugin=blog.
  5. CI/CD Integration:
    • Add Bootloader-specific tests (e.g., verify lazy-loading works in test environments).
    • Implement canary deployments for Bootloader-based plugins.

Compatibility

  • Laravel Versions: Officially supports Laravel 13.x; backward compatibility with 9–12 is maintained but may require feature flags for Bootloader/App Context features.
  • PHP Extensions: No changes; continues to require PDO, Fileinfo, etc.
  • Third-Party Packages:
    • Plugins can use any Composer package, but namespace collisions remain a risk (mitigate with Vendor\PluginName\).
    • Bootloader-aware packages (e.g., Spatie’s Laravel packages) integrate seamlessly.
  • Frontend Frameworks:
    • Works with Blade, Livewire, Inertia.js, or Vue via Vite 4+ or Laravel Mix.
    • Supports plugin-specific asset versioning (e.g., /plugins/blog/js/app.js?v=3.4.0).

Sequencing

  1. Phase 1: Laravel 13 Upgrade (2–3 weeks):
    • Upgrade core app to Laravel 13.
    • Install fresns/plugin-manager:^3.4.0.
    • Configure config/plugins.php for Bootloader support.
  2. Phase 2: Plugin Bootloader Migration (3–5 weeks):
    • Convert 1–2 plugins to use Bootloaders (e.g., replace PluginServiceProvider).
    • Test lazy-loading and context switching.
  3. Phase 3: App Context Integration (2–4 weeks):
    • Migrate context-dependent configs (e.g., config('plugins.blog.api')).
    • Update middleware/routes to use app()->context().
  4. Phase 4: Asset Pipeline Upgrade (1–2 weeks):
    • Migrate plugins to Vite 4+ for asset compilation.
    • Test plugin-specific asset versioning.
  5. Phase 5: Advanced Features (Ongoing):
    • Explore plugin marketplace (Composer repository).
    • Implement hybrid deployment (Docker/microservices).
    • Add custom CLI commands (e.g., php artisan plugin:bootloaders).

Operational Impact

Maintenance

  • Bootloader Benefits:
    • Reduced Boot Time: Lazy-loading via Bootloaders decreases core app startup time.
    • Isolated Updates: Plugins can be updated independently (e.g., composer update vendor/plugin).
  • Context Management:
    • Dynamic Configs: Easier to manage environment-specific plugin settings (e.g., config('plugins.blog.debug' = true) in .env).
    • Fallbacks: Plugins can define context fallbacks (e.g., use web context if
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php
trappistes/laravel-custom-fields
splash/sonata-admin
splash/metadata