- What is krystal-sf/plugin-manager used for?
- It is a lightweight plugin manager for Laravel and PHP applications that lets you organize modular extensions as self-contained packages instead of scattering code through your core application. It handles plugin discovery, registration, activation and deactivation, and lifecycle events. The goal is a clean API so you can install, enable and disable plugins without rewriting your main codebase.
- How do I install krystal-sf/plugin-manager with Composer?
- Install it with composer require krystal-sf/plugin-manager and then register the package service provider if your Laravel version does not auto-discover it. Before committing the constraint, confirm that the Packagist name matches the canonical GitLab repository, since the vendor namespace, package name and repository URL do not line up cleanly. Also check whether a tagged stable release exists rather than relying on a dev branch.
- Which Laravel and PHP versions does this plugin manager support?
- The overview does not publish a version support matrix, so treat this as an unknown you must verify yourself. Inspect the composer.json require and require-dev constraints and check for a tagged release and changelog before adopting. If the package was originally built against Symfony components, confirm it actually runs on your target Laravel and PHP versions rather than assuming compatibility.
- How do I enable or disable plugins through configuration?
- The package is designed around configuration-driven activation, so plugins can be registered but only loaded when they are switched on. That lets you ship a plugin with your application while keeping it dormant until you explicitly enable it. Check the published config file for the enable list and any per-plugin options such as priority or environment restrictions.
- Does this package integrate with Laravel service providers?
- Yes, seamless Laravel service provider integration is one of the listed features, so discovered plugins can boot their own providers and register bindings, routes and commands. The manager sits on your application boot path, which means ordering and failure behavior matter. Test that a broken or disabled plugin cannot halt the rest of the application from booting.
- Is this package for Laravel or Symfony?
- This is the key ambiguity to resolve before you adopt. The package is presented here as a Laravel plugin manager, but its own description references a Symfony Advanced Plugins Manager and the krystal-sf vendor namespace reads as Krystal Symfony. If the underlying artifact targets the Symfony kernel and DI container, it is not a drop-in Laravel dependency and would need an adapter or a reimplementation on Laravel primitives.
- What lifecycle hooks does the plugin manager provide?
- It exposes lifecycle hooks for install, boot and uninstall, which let a plugin run setup tasks, register its services and clean up after itself. These hooks are the right place for migrations, published assets or cache warmers rather than doing that work in the provider constructor. Make the hooks idempotent, since a failed install or uninstall can leave partial state behind.
- How does it compare to nwidart/laravel-modules or Laravel's native package discovery?
- Laravel's built-in package and service provider discovery is static and resolved at install time, whereas this package adds runtime enable and disable plus install and uninstall lifecycle hooks. nwidart/laravel-modules is focused on structuring your own application into modules rather than hosting third-party extension code. If you only need static auto-discovery, native Laravel features cover it and this package adds little; the value appears when you need dynamic activation.
- Can I register plugins from custom sources?
- Yes, the package advertises an extensible loader API for custom plugin sources, so you can discover plugins from directories, Composer packages or an internal registry instead of a single hardcoded path. Implement a loader that returns plugin manifests and register it with the manager. Keep the loader deterministic and cache the results, because discovery runs on every boot.
- Is it safe to run third-party plugins with this package in production?
- A plugin manager loads arbitrary code into your application by design, so plugins typically run with full application privileges. The overview does not describe sandboxing, signature verification or an allowlist, which means manifest validation, filesystem permissions and trusted-source policies remain your responsibility. Because the package has no visible community or dependents, also plan for maintenance: confirm a license you can distribute under, an internal owner, and a fork or escrow strategy if upstream development stops.