- What is phillarmonic/allegro-redis-odm-bundle used for?
- It is a Symfony bundle that integrates Allegro Redis ODM into a Symfony application. The bundle provides autoconfiguration, service wiring, Redis connection and document mapping setup, and repository access for Redis-backed persistence. It is not a Laravel package.
- How do I install phillarmonic/allegro-redis-odm-bundle?
- Install it with Composer using composer require phillarmonic/allegro-redis-odm-bundle. Then enable the bundle in your Symfony application, typically in config/bundles.php for Symfony Flex apps. Check the package README and composer.json for exact version and Symfony compatibility requirements.
- Does this package work with Laravel?
- No, phillarmonic/allegro-redis-odm-bundle is a Symfony bundle, not a Laravel package. It relies on Symfony bundle autoconfiguration and service wiring. Laravel applications would need a Laravel-specific Redis ODM package or direct Redis client integration instead.
- Which Symfony versions are supported by this bundle?
- The provided context does not list exact Symfony version constraints. Check the package composer.json and README for supported Symfony framework versions before installing. This is important because Symfony bundle APIs and autoconfiguration behavior can vary between major versions.
- How do I configure the Redis connection for Allegro Redis ODM?
- Configure Redis connection details such as host, port, database, and authentication through your Symfony configuration and environment variables as documented by the bundle. The bundle handles service wiring so the ODM can use that connection. Refer to the README for the exact configuration keys and environment variable names.
- How does document mapping work with this bundle?
- The bundle sets up document mapping for Allegro Redis ODM inside Symfony. You define your Redis documents according to the ODM conventions, and the bundle wires the mapping and related services. See the README for specific mapping configuration and examples.
- Can I inject repositories to query Redis documents?
- Yes, repository access is part of the bundle's purpose. The bundle wires repository services so you can inject them into your Symfony services and controllers, typically through autowiring. Repository methods then come from Allegro Redis ODM rather than the bundle itself.
- How should I test an application that uses allegro-redis-odm-bundle?
- Use a dedicated test Redis instance or mock the ODM services in your Symfony test container. Functional tests can point the bundle at a test Redis database and clean it between runs. Keep test-specific connection settings in your Symfony test environment configuration.
- Is this bundle suitable for production Redis persistence?
- The bundle provides Redis-backed persistence through Allegro Redis ODM, but production suitability depends on your Redis deployment, the ODM's maturity, and the package's maintenance status. Review the README, TPM assessment, and issue tracker before relying on it. Test connection handling, failover, and data durability in a staging environment first.
- What are alternatives to allegro-redis-odm-bundle?
- Alternatives include using a Redis client such as Predis or phpredis directly, Symfony Cache for suitable caching use cases, or other Redis ODM and bundle packages. Laravel applications should look at Laravel-specific Redis packages instead. Evaluate alternatives based on maintenance activity, Symfony version support, and whether you need full object-document mapping.