- Can I use this package in a Laravel app without Symfony components?
- No, this package is tightly coupled to Symfony AI Chat and requires Symfony Messenger and Dependency Injection. If your Laravel app doesn’t already use Symfony components, you’ll face significant integration friction, including service container conflicts and manual bootstrapping.
- How do I prevent Redis key collisions with Laravel’s existing cache/queue keys?
- Use a dedicated Redis database for this package (e.g., `DB 2` in Laravel’s config) or prefix all keys with a unique namespace like `symfony_ai:`. The package doesn’t enforce isolation, so collisions with `cache:*` or `queue:*` keys are possible without explicit separation.
- Does this support Laravel’s job queues for async message processing?
- No, this package relies on Symfony’s event-driven Messenger component, which doesn’t natively integrate with Laravel’s queue system. You’d need to manually bridge Symfony events to Laravel jobs or use a custom solution like mapping events to queue listeners.
- What Laravel versions are officially supported?
- The package doesn’t explicitly list Laravel versions, but it depends on Symfony components that may not align with Laravel’s release cycle. Test thoroughly in your target Laravel version (e.g., 10.x) as compatibility isn’t guaranteed.
- How do I enforce message expiration (TTL) to avoid Redis memory bloat?
- The package doesn’t include built-in TTL policies. You must manually set expiration on Redis keys (e.g., `redis->set($key, $value, 'EX', 86400)`) or use a Laravel scheduler to prune old messages via a custom command.
- What happens if Redis fails during a chat session?
- Without additional configuration, message loss is possible. The package lacks built-in fallbacks like database backups or in-memory caching. You’d need to implement a custom recovery strategy, such as writing critical messages to a database table as a backup.
- Are there Laravel-native alternatives for AI chat message storage?
- Yes, consider using Laravel’s built-in database caching (`cache:store=database`) or packages like `spatie/laravel-redis-query` for Redis-based storage with Eloquent-like abstractions. For AI-specific needs, a custom Redis repository or a database table with TTL might be simpler.
- How do I monitor Redis performance for this package in production?
- Use Redis monitoring tools like `redis-cli --latency` or integrate with Laravel’s existing stack (e.g., Prometheus via `spatie/laravel-prometheus`). The package doesn’t include observability features, so you’ll need to track key operations (e.g., `SET`/`GET` latency) manually.
- Will this package break if Symfony AI Chat changes its API?
- Yes, since this is a bridge to Symfony AI, any breaking changes in Symfony’s Messenger or AI components could require updates. The package’s small community and lack of changelog suggest higher risk of abandonment or compatibility issues.
- Can I use this for high-scale real-time chat in Laravel?
- Technically yes, but only if you’re already using Symfony components and can handle the integration overhead. For pure Laravel apps, the performance benefits may not outweigh the complexity—especially if you need features like Eloquent relationships or query filtering.