qmetrics.net

FOSRestBundle

Symfony bundle for building RESTful HTTP APIs

FOSRestBundle adds Symfony tools to build REST APIs faster, including format-agnostic controllers, content negotiation, and structured API errors.

Overview

FOSRestBundle is a Symfony bundle focused on REST-style HTTP APIs and applications. It layers conventions and helpers on top of Symfony so controllers can stay independent of specific output formats while still returning JSON, XML, or other negotiated representations.

Documented capabilities include a view layer for format-agnostic controllers, Accept-header negotiation with support for custom MIME types, decoding of request bodies and Accept headers in a REST-oriented way, and mapping exception codes to HTTP status responses. Error rendering can align with RFC 7807 through the Symfony Serializer or JMS Serializer.

Installation and configuration are covered in the bundle’s documentation. The bundle is distributed under the MIT license and is maintained as part of the FriendsOfSymfony ecosystem for PHP projects that already use Symfony.

Teams choose it when they want Symfony’s routing and dependency injection model but need shared patterns for media types, serialization, and API error shapes instead of hand-rolling those concerns in each controller.

Key features

  • Format-agnostic view layer
  • Accept header negotiation
  • REST request body decoding
  • Exception to HTTP status mapping
  • RFC 7807-compatible error output
  • Custom MIME type handling
  • Symfony Serializer integration
  • JMS Serializer integration

Use cases

  • JSON APIs on Symfony
  • Multi-format REST endpoints
  • Standardized API error responses
  • Content negotiation by Accept header

Tags

Similar software

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

OkHttp

HTTP client for JVM, Android, and GraalVM

OkHttp is an HTTP client library tuned for efficient networking on Android, Java, and GraalVM native images. It offers synchronous and asynchronous call APIs with a fluent request builder.

★ 47.1k⟳ yesterdayApache-2.0
Frameworks & PlatformsDesktop/CLI app

gRPC

Cross-language remote procedure call framework

gRPC is an RPC framework that lets client and server programs communicate transparently and supports building connected, multi-language systems.

★ 45.5k⟳ todayApache-2.0

tRPC

End-to-end typesafe TypeScript APIs without code generation

tRPC helps teams define server procedures and call them from clients with full TypeScript types for inputs, outputs, and errors—no schemas or codegen step.

★ 40.9k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

go-zero

Cloud-native Go microservices and RPC framework

go-zero is a Go web and RPC framework with code generation, built-in resilience middleware, and tooling aimed at stable high-traffic services.

★ 33.5k⟳ 9 days agoMIT