- How do I install maksslesarenko/emdrive in a Laravel app?
- Install it with composer require maksslesarenko/emdrive. The service provider is auto-discovered through Laravel package discovery, so no manual registration is normally needed. Publish the config with php artisan vendor:publish and set the driver you want to use. Check the repository README for the exact provider and config tag names.
- Does emdrive support Laravel 11 and PHP 8.2?
- The package is described as framework-native and PSR-compliant PHP 8+, so it is intended to run on modern Laravel versions such as Laravel 10 and 11 with PHP 8.2. The overview does not publish explicit illuminate/* or PHP constraints, so confirm them in composer.json before adopting. Run composer why-not against your lockfile to catch conflicts.
- How do I register a custom driver in emdrive?
- emdrive exposes a Manager-style extend() hook for registering drivers, which is the documented extension point. Register your driver in a service provider's boot method, typically by calling extend on the emdrive manager with a name and a closure or class factory. Confirm the manager accessor and closure signature in the README, because the facade alias and binding name are package-specific.
- Is emdrive a replacement for Laravel's built-in Manager pattern?
- No, it follows the same first-party idiom as Laravel's cache, queue, filesystem, and mail managers rather than replacing them. It gives you a config-selected manager and facade for your own service layer. The trade-off is whether the drivers it wraps are substantial enough to justify the extra abstraction.
- What drivers ship with emdrive?
- The provided overview does not list the shipped drivers, so that is the first thing to verify in the repository. The critical question is whether the driver you need exists and, if not, how much code a custom driver requires. If drivers are thin HTTP or shell wrappers, the abstraction may cost more than it saves.
- How do I test Laravel code that uses emdrive drivers?
- In your own tests, override the emdrive config to point at a fake or in-memory driver and resolve the manager from the container, or swap the facade root. That lets you exercise driver switching without hitting external services. The package's own test suite and CI status are not confirmed in the overview, so do not assume driver resolution is covered upstream.
- Is emdrive safe for production use?
- Treat it as unproven: the assessment notes zero stars, zero dependents, a single maintainer, and no visible test suite or release cadence. For a package whose value is swapping implementations by config, untested driver resolution can fail at call time rather than at boot. A timeboxed spike and a wrapper around its contract are sensible risk controls.
- Does emdrive require database migrations or own any state?
- Based on the overview, emdrive is a resolution layer and does not imply a database schema or migrations. It registers a manager, reads config, and resolves drivers. Confirm in the repository that it does not publish migrations or own caches or queued jobs.
- How do I override emdrive configuration per environment?
- Publish the package config, then override values in your per-environment .env or config files. Keep credentials and environment-specific driver choices out of version control and map them through your normal secret management. Laravel's config caching means you should clear and rebuild config after changes.
- What are alternatives to emdrive for driver-based services in Laravel?
- Laravel's built-in Manager pattern is the main alternative: write a small manager class with a driver() method and extend() hook, as the framework does for cache, queue, filesystem, and mail. Other options are existing driver-based packages or a simple service container binding without a manager. emdrive is essentially a packaged version of that idiom, so compare it against roughly a hundred lines of your own framework-native code.