- How do I install joserick/laravel-livewire-discover in a Laravel app?
- Install the package with Composer and let Laravel package discovery register its service provider. If the package exposes configuration, publish it and review the directories and namespaces you want scanned. Then run your Livewire component tests to confirm that discovered components match your expected registrations.
- Which Laravel and Livewire versions does laravel-livewire-discover support?
- The package is intended for Laravel applications using Livewire, and v1.3.2 is a patch-level bug fix rather than a version constraint change. Check the repository's composer.json and README for the exact Laravel and Livewire constraints before installing. Re-test the package after any Livewire major upgrade to confirm discovery behavior still matches your application.
- Does laravel-livewire-discover replace manual Livewire::component() registration?
- It can reduce or eliminate manual Livewire::component() registration by discovering components from configured directories. Adopt it incrementally: compare discovered components against your existing manual registration list before removing anything. Keep manual registrations in place until discovery parity is proven, especially if you use a mix of prefixed and default component namespaces.
- How does laravel-livewire-discover discover Livewire components?
- The package scans configured directories and registers Livewire components by convention instead of requiring each class to be listed manually in a service provider. It is described as lightweight and configurable, and it supports loading multiple class namespaces. Review the configuration so the scanned paths and namespace behavior match your application's component structure.
- What does the v1.3.2 release fix for prefixed Livewire component namespaces?
- v1.3.2 is a targeted bug fix for a namespace restoration typo that could prevent default components from being registered after prefixed ones. This mainly affects applications that mix prefixed component namespaces with default component discovery. It is a non-breaking patch, but you should test a representative prefixed component followed by default components if that matches your component tree.
- How do I configure prefixed namespaces for Livewire component discovery?
- Prefixed namespaces are handled through the package configuration, so publish and review the config if applicable. Confirm that the package's namespace-prefix behavior matches your application's conventions and existing Livewire registration. Test a prefixed-namespace component followed by default components, since that ordering is the area addressed by v1.3.2.
- Will laravel-livewire-discover slow down my Laravel app at boot?
- The package is described as lightweight, but the provided information does not specify whether discovery results are cached or recomputed at boot. For large applications, benchmark boot time and Livewire component resolution in staging with production-like caches enabled. If boot overhead is a concern, review the package source and configuration before rolling out.
- Is laravel-livewire-discover safe to use in production?
- The technical risk is considered low because the package is small in scope and v1.3.2 is a maintenance release correcting a specific namespace restoration issue. Install it in a development branch, compare discovered components to your manual registrations, and run your Livewire test suite before deploying. Use a staging environment with production-like caches and keep a rollback plan that restores manual registrations if discovery parity fails.
- Can I use this package with modular, multi-tenant, or package-based Livewire components?
- The package fits standard Laravel and Livewire applications that want convention-based component discovery across configured directories and namespaces. It is less compelling for highly custom component layouts, strict manual-registration policies, or nonstandard namespace strategies. If you use modular, multi-tenant, or package-based component structures, validate discovery parity carefully before removing manual registrations.
- What are alternatives to automatic Livewire component discovery?
- Alternatives include manually registering each component with Livewire::component(), writing your own discovery loop in a service provider, or relying on built-in Livewire conventions that fit your component layout. This package is most useful when you need configurable discovery across multiple class namespaces without custom registration code. Evaluate alternatives against your namespace, prefixed-component, and testing requirements.