Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rest Routing Bundle Laravel Package

handcraftedinthealps/rest-routing-bundle

Symfony bundle that restores FOSRestBundle-style automatic REST route generation. Supports format options and method/name prefixing, and includes a command to dump/convert type: rest routes into standard Symfony routes for migration or opt-out.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API-Driven Roadmap: Accelerates migration from FOSRestBundle 2.x to Symfony 6+/7+ by automating RESTful route generation, reducing manual YAML/XML route configuration. Aligns with Symfony’s shift toward attribute routing and cleaner architecture.
  • Build vs. Buy: Buy—avoids reinventing REST routing logic while maintaining compatibility with existing FOSRestBundle patterns. Ideal for teams already invested in FOSRestBundle’s ecosystem.
  • Use Cases:
    • Legacy System Modernization: Gradually migrate APIs from FOSRestBundle 2.x to Symfony’s native routing (via the dump-symfony-routes command).
    • Consistent API Development: Enforce RESTful conventions (e.g., GET /users, POST /users) without manual route definitions, reducing boilerplate.
    • Multi-Format Support: Automatically handle json, xml, or other formats via annotations (e.g., @Version, @Prefix), simplifying content negotiation.
    • Team Onboarding: Reduces cognitive load for developers unfamiliar with Symfony’s attribute routing by leveraging familiar FOSRestBundle annotations.

When to Consider This Package

  • Adopt When:

    • Your project uses FOSRestBundle 2.x and needs to upgrade to Symfony 6/7+ (where FOSRestBundle 3.x lacks auto-routing).
    • You prioritize developer velocity over fine-grained route control (e.g., complex constraints, custom route names).
    • Your API follows standard REST conventions (resource-based endpoints) and doesn’t require non-standard routing logic.
    • You want a low-risk migration path with a built-in tool (dump-symfony-routes) to opt out later.
  • Look Elsewhere When:

    • You need advanced route customization (e.g., dynamic segments, conditional routes) beyond RESTful patterns.
    • Your team prefers Symfony’s native attribute routing (#[Route]) from the start—this bundle adds abstraction overhead.
    • You’re building a non-REST API (e.g., GraphQL, WebSockets) where REST conventions don’t apply.
    • Your project already uses API Platform or NelmioApiDocBundle, which handle routing differently.
    • You require high performance (this bundle adds a compiler pass for route generation, which may introduce minimal overhead).

How to Pitch It (Stakeholders)

For Executives:

"This package lets us future-proof our API infrastructure by automating REST route generation—saving 30–50% of backend dev time on route maintenance. It’s a low-risk migration path from FOSRestBundle to Symfony 6/7+, with a built-in tool to transition to native routing later. By standardizing our API endpoints, we reduce technical debt and accelerate feature delivery."

Key Outcomes:

  • Faster API development cycles.
  • Reduced technical debt from manual route management.
  • Seamless upgrade path to Symfony’s latest versions.

For Engineering:

*"The RestRoutingBundle replaces FOSRestBundle’s auto-routing in Symfony 6/7+, using familiar annotations (@RouteResource, @Prefix) to generate RESTful routes automatically. It’s a drop-in replacement for teams using FOSRestBundle 2.x, with:

  • Zero manual YAML/XML: Routes are inferred from controller methods.
  • Multi-format support: JSON/XML/CSV via annotations (e.g., @Version).
  • Migration safety net: The fos:rest:routing:dump-symfony-routes command exports all routes to YAML for later opt-out.

Why it’s better than rolling our own:

  • Battle-tested: Used in production by the original FOSRestBundle team.
  • Symfony-aligned: Works with Symfony’s compiler pass system.
  • Future-proof: Supports PHP 8.2–8.4 and Symfony 6–7+.

Trade-offs:

  • Less control over route names/paths (but aligns with REST best practices).
  • Slightly higher memory usage during route compilation (negligible in most cases)."*

Call to Action: "Let’s pilot this in our /users API module to validate the time savings, then roll it out to other REST endpoints. We can phase out the bundle later if needed."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin