draw/framework-extra-bundle
Symfony bundle that integrates draw/* components with configuration under the draw_framework_extra namespace. Some features auto-enable when components are present; others are opt-in to avoid unnecessary load or side effects. Includes Application and OpenAPI integrations.
API Documentation & Developer Experience (DX):
#[OpenApi\Tag], #[OpenApi\Operation]), aligning with modern PHP attributes (Symfony 6+).Roadmap Priorities:
@Serialization) to standardize API responses (status codes, headers, serializer groups) across microservices.Build vs. Buy:
VersionListener) to adapt to project-specific needs (e.g., API versioning, custom headers).Use Cases:
201 Created with Location header).enableDoctrineSupport and definitionAliases to manage entity references (e.g., App\Entity\User → User).Adopt When:
Look Elsewhere If:
"This package lets us automate API documentation and standardize responses across our Symfony services with minimal developer overhead. By using annotations (like #[OpenApi\Tag]), our team can document APIs as they code, reducing the time spent on manual Swagger files. It also gives us a lightweight alternative to FOSRestBundle, cutting dependency complexity. Early adoption could save 10–20 hours/month on API maintenance, and the dynamic versioning feature aligns with our roadmap for multi-environment APIs."
Risk: Low—it’s a small, focused bundle with high upside for DX. We can pilot it on one service (e.g., the User API) before scaling.
*"This bundle integrates draw/* components into Symfony to handle two key pain points:
#[OpenApi\Operation] to controllers to auto-generate Swagger docs—no more manual YAML/JSON.@Serialization annotations to control HTTP status codes, headers, and serializer groups per endpoint.Why it’s better than alternatives:
/api/v1/...).How to start:
draw_open_api in config/packages/draw_framework_extra.yaml.#[OpenApi\Tag("Users")]).responseConverter: true for auto-serialization.Pilot plan: Let’s try it on the Order API to replace our current manual OpenAPI docs and see how it handles serialization."*
Trade-offs:
How can I help you explore Laravel packages today?