The Routing component matches incoming HTTP requests to routes and extracts configuration variables such as controller and parameters. It is installed as a Composer package for PHP apps.
Overview
Symfony Routing maps an HTTP request to a set of configuration variables that downstream code uses to dispatch the application. It is distributed as a standalone Symfony package that PHP projects add with Composer alongside other Symfony components or full-stack Symfony applications.
The component focuses on defining routes, matching request paths and methods, and generating URLs from route names and parameters. Documentation and source are published on the Symfony packages site; releases follow the broader Symfony versioning cadence.
Many PHP content management, commerce, and framework projects depend on this router, including Drupal, TYPO3, PrestaShop, Laravel integrations, and Symfony itself, as listed on the package page. It is MIT-licensed and widely reused outside the Symfony framework core.
For adopters, installation is a single Composer require of the symfony/routing package. The package is maintained as part of the Symfony ecosystem with public issue tracking and contribution flows through the main Symfony project.
Key features
- HTTP request to route matching
- Route parameter extraction
- URL generation from route definitions
- Composer-installable PHP package
- Symfony component documentation
- Integration with Symfony HttpFoundation
- Used across major PHP CMS and shops
- MIT-licensed reusable library
Use cases
- Defining REST and web routes in PHP
- Building custom PHP microframeworks
- Sharing routing logic in Symfony apps
- Migrating apps that need named routes
- Centralizing URL generation in CMS plugins