- What is dunglas/api-bundle used for?
- It provides API Platform Core, a Symfony bundle for building hypermedia-driven REST and GraphQL APIs from resource metadata. It natively supports JSON-LD, Hydra, OpenAPI v2/v3, JSON:API, HAL, and Problem Details. You use it to create API-first projects quickly and extend or override behavior as needed.
- Does dunglas/api-bundle work with Laravel?
- It is Symfony-first, and the Laravel provider is better described as supported-but-thin rather than full parity. Recent releases add Laravel-specific fixes such as nullable optional belongsTo handling and relation test coverage. Expect to override Symfony-specific services such as PropertyInfo and EventDispatcher manually.
- How do I install API Platform Core in a Laravel application?
- Install the package with Composer and wire the Laravel provider into your application, then override the Symfony-specific services it depends on. The package is distributed as a Symfony bundle, so Laravel setup is not the primary documented path. Validate metadata, routing, and serialization in a small pilot before expanding.
- Which Laravel versions are supported by dunglas/api-bundle?
- There is no explicit Laravel version matrix in the provided context. Compatibility depends on the API Platform release, the Laravel provider, and your PHP/Symfony service overrides. Run the Laravel test suite and a smoke test against your target Laravel version before committing.
- What API formats does API Platform Core support?
- It natively supports JSON-LD, Hydra Core Vocabulary, OpenAPI v2 and v3, JSON:API, HAL, and Problem Details. It also provides GraphQL support out of the box. The same resource metadata can drive both REST and GraphQL surfaces.
- Can I use API Platform Core for high-performance production APIs?
- Yes, it is designed for rapid and high-performance API-first projects, but long-running workers need attention. v5.0.4 resets the skolem IRI converter and Mercure publisher between requests, confirming per-request state bleed was real in the Symfony bridge. If you run Laravel Octane or similar workers, verify and reset per-request state explicitly.
- How does v5.0.4 improve OpenAPI and JSON Schema output?
- It tightens contract fidelity: mixed emits an empty schema, intersection types use allOf, gen_id nesting follows the property, nested resources respect the output DTO, and operation groups are retained in context. These changes matter most when generating clients from OpenAPI. Regenerate and diff client contracts after upgrading.
- What changed with parameter precedence in API Platform v5.0.4?
- Operation parameters now take precedence over property parameter attributes. This is a silent semantic change, so resources relying on the previous implicit resolution order may behave differently without an error. Audit parameter-heavy resources and add tests around request handling.
- Can I expose REST and GraphQL from the same API Platform resource?
- Yes, API Platform Core supports HATEOAS-compliant REST and GraphQL from a single resource declaration. v5.0.4 strengthens the shared metadata layer and allows GraphQL operations in parameter attributes on properties. That reduces drift between your REST and GraphQL contracts.
- What are alternatives to dunglas/api-bundle for Laravel APIs?
- If you do not need Hydra/JSON-LD hypermedia or API Platform's OpenAPI generation, Laravel-native tools such as API Resources, Laravel JSON:API, or Lighthouse for GraphQL are simpler fits. Choose API Platform Core when standards compliance and one metadata model for REST and GraphQL justify the Symfony integration overhead. Evaluate the thin Laravel provider against your production requirements first.