- What is ikoene/marvel-api-bundle used for?
- It is a Symfony bundle that provides a clean integration with the official Marvel Comics API. It exposes dependency-injected services for characters, comics, creators, events, series, and stories, and handles authentication and HTTP requests so you do not have to sign every call manually. You configure it through standard Symfony bundle settings and query Marvel data through an expressive service interface.
- How do I install ikoene/marvel-api-bundle?
- Install the package with Composer using the ikoene/marvel-api-bundle package name, then register the bundle in your Symfony application. After registration, add the required Marvel API configuration, including your public and private keys, in your Symfony configuration files. Check the repository README for the exact bundle registration syntax for your Symfony version.
- Does ikoene/marvel-api-bundle work with Laravel?
- No, it is designed as a Symfony bundle and relies on Symfony's bundle registration and dependency injection configuration. Laravel does not load Symfony bundles in the same way, so you should not expect a drop-in Laravel package. You could reuse the underlying API logic with custom wiring, but for most Laravel projects a Laravel-specific client or a small custom wrapper is a better fit.
- How do I configure Marvel API public and private keys?
- The bundle is configured through standard Symfony bundle configuration, where you supply your Marvel API public and private keys. Those keys are used to generate the authentication parameters required by the Marvel API. Keep the private key out of version control and load it from environment variables or Symfony secrets.
- What Marvel API resources does this bundle expose?
- It provides service-based access to characters, comics, creators, events, series, and stories. Each resource is available through injected services rather than manual HTTP calls. That keeps your application code focused on querying and using Marvel data instead of building request URLs.
- Does it support pagination with limit and offset?
- Yes, the bundle supports pagination and query parameters such as limit, offset, and ordering. You pass those parameters through the service interface when querying a resource. The bundle then forwards them to the Marvel API as part of the request.
- How does authentication with the Marvel API work?
- The Marvel API requires each request to include a timestamp, your public key, and a hash generated from the timestamp, private key, and public key. This bundle handles that signing automatically so you do not have to build the authentication parameters yourself. You only need to provide the public and private keys in configuration.
- Which Symfony and PHP versions are supported?
- The supported Symfony and PHP versions are defined by the package's composer.json and README, so check those before installing. Because this is a Symfony bundle, you should match it to a Symfony version that still supports bundle registration and the dependency injection features it uses. If you are on an older or very new Symfony release, verify compatibility in the repository before adding it to production.
- Can I use a custom PSR-compliant HTTP client?
- The bundle advertises PSR-compliant HTTP client integration, so it is designed to work with HTTP clients that follow PSR standards. Check the repository configuration for how to inject or override the client in your Symfony app. A configurable PSR client can help you control timeouts, retries, and logging around Marvel API calls.
- Is ikoene/marvel-api-bundle maintained and safe for production?
- Maintenance status is best judged from the GitHub repository's recent commits, releases, and issue activity. Before using it in production, pin a known version, review its dependencies, and confirm it supports your Symfony and PHP versions. Because it wraps an external API, also plan for error handling, rate limits, and API changes in your application.