nowo-tech / routing-kit-bundle
Symfony bundle for DB-driven locale routes, canonical URL styles, CRUD panel, and SeoKit compatibility.
Package info
github.com/nowo-tech/RoutingKitBundle
Type:symfony-bundle
pkg:composer/nowo-tech/routing-kit-bundle
Requires
- php: >=8.2 <8.6
- nowo-tech/form-kit-bundle: ^2.2
- nowo-tech/ui-kit-bundle: ^2.2
- symfony/config: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/event-dispatcher: ^7.4 || ^8.0
- symfony/finder: ^7.4 || ^8.0
- symfony/form: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/routing: ^7.4 || ^8.0
- symfony/security-core: ^7.4 || ^8.0
- symfony/security-csrf: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
- twig/extra-bundle: ^3.12
- twig/string-extra: ^3.12
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- igor-php/igor-php: ^0.10.1
- nowo-tech/phpstan-frankenphp: ^1.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.3.1
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.0
- symfony/asset: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
- symfony/messenger: ^7.4 || ^8.0
- symfony/twig-bundle: ^7.4 || ^8.0
- twig/twig: ^3.12
- vincentlanglet/twig-cs-fixer: ^4.1
Suggests
- doctrine/orm: Implement RoutePathStorageInterface against Doctrine entities
- nowo-tech/form-kit-bundle: Panel Symfony forms (FormOptionsTrait, profile routing_kit). Pulled in automatically when using the CRUD panel.
- nowo-tech/seo-kit-bundle: Bridge: RoutingKit paths feed SeoKit canonical/hreflang (requires SeoPathBuilderInterface)
- symfony/asset: Required for the nowo_routing_kit named asset package (panel CSS via assets:install)
- symfony/messenger: Async hit counting for operator URL redirects (url_redirects.hits.message_bus)
- symfony/security-bundle: Recommended: firewall + ROLE_ADMIN for /_routing
- symfony/translation: Required for |trans in panel templates
- symfony/twig-bundle: Required to render the routing CRUD panel
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v1.10.0
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.1
- v1.5.0
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-fix/config-parameters
- dev-chore/uikit-2.2
- dev-fix/ui-polish
- dev-feature/ui-page-contract
- dev-req-twig-005-symfony-forms
This package is auto-updated.
Last update: 2026-10-18 19:47:19 UTC
README
⭐ Found this useful? Install from Packagist · Give it a star on GitHub so more developers can find it.
Routing Kit Bundle — DB-driven (pluggable storage) locale paths for Symfony: dual /foo + /{locale}/foo access, admin-defined canonical URLs, Twig CRUD panel, route-cache invalidation, and SeoKitBundle path bridge. Tested on Symfony 7.4, 8.0, and 8.1 · PHP 8.2+ (Symfony 8.x requires PHP 8.4+).
This bundle is FrankenPHP worker mode friendly.
Features
- Storage — One row per
(routeName, locale); filesystem JSON by default; swap viaRoutePathStorageInterface. - Locales — YAML
default_locale+locales, or a customLocaleProviderInterface. - Canonical definition — Paths stored without
{_locale}; the loader always builds/{_locale}/…. - Styles —
canonical_style, trailing slash, alias mode (redirect/alias). - Fallback — Missing locale row → default-locale path for that route name.
#[Routable]— Controllers offered in the CRUD; params + constraints validated on save.- Loader —
type: nowo_routing_kitregisters{name}.{locale}with_canonical_route(import last). - Panel — Twig CRUD under
/_routingon the UiKit page contract (list / form / confirm scaffolds, themed once innowo_ui_kitfor every bundle; see docs/TEMPLATES.md) + Symfony forms (FormKit) for create/edit, export, import, and clear-cache actions (auto invalidation after save/delete). Protect withsecurity.access_roles(default[ROLE_ADMIN]) /allow_unauthenticated. - Default locale without prefix (opt-in,
default_locale_unprefixed) — Router decorator: the default locale generates the bare twin<route>_unlocalizedof any route that has one (AuthKit / SiteBackup / app routes), andGET /{default}/…301s to it. See docs/USAGE.md. - SeoKit — Optional bridge decorates
SeoPathBuilderInterfacefor canonical/hreflang paths. - URL redirects (opt-in,
url_redirects.enabled) — Operator-managed old path → new path / URL redirects applied before routing, with a panel section at/_routing/redirects, protected paths, live-page detection (LivePathCheckerInterface), hit counting (sync or Messenger) and pluggable storage. See docs/REDIRECTS.md.
Installation
composer require nowo-tech/routing-kit-bundle
With Symfony Flex, the recipe registers the bundle and adds config (see .symfony/recipe). Without Flex, see docs/INSTALLATION.md.
# config/routes.yaml — panel, then app routes, then DB loader LAST nowo_routing_kit_panel: resource: '@NowoRoutingKitBundle/Resources/config/routes.yaml' # … application routes … nowo_routing_kit_db: resource: . type: nowo_routing_kit
The loader registers {name}.{locale} with _canonical_route. Protect /_routing with your firewall.
Requirements
- PHP
>=8.2(<8.6); Symfony 8.0 and 8.1 require PHP 8.4+ - Symfony 7.4, 8.0, or 8.1
- Twig for the CRUD panel templates
Configuration
nowo_routing_kit: default_locale: en locales: [en, es] web_ui: path_prefix: /_routing # panel pages render in nowo_ui_kit.layouts.admin redirects: canonical_enabled: true seo_kit_bridge: true url_redirects: enabled: false # opt-in operator redirects (docs/REDIRECTS.md)
Usage
use Nowo\RoutingKitBundle\Attribute\Routable; use Nowo\RoutingKitBundle\Attribute\RouteParam; #[Routable(name: 'app_about')] public function about(): Response { … } #[Routable(name: 'app_blog_show', params: [ new RouteParam('slug', required: true, requirement: '[a-z0-9-]+'), ])] public function show(string $slug): Response { … }
Open /_routing to manage paths. See docs/USAGE.md.
Development
make up
make install
make test
make cs-check
make phpstan
make igor
make release-check
Install git hooks once per clone: make setup-hooks (REQ-GIT-001).
Demos
make -C demo up-symfony8
Open http://localhost:8058 — panel at /_routing. FrankenPHP mode is controlled by FRANKENPHP_MODE (classic | worker, default worker) in the demo .env.
Playwright e2e of the panel and the README screenshots (REQ-DEMO-013):
make -C demo/symfony8 test-e2e
make -C demo/symfony8 demo-screenshots # refreshes docs/images/demo/*.webp
Documentation
- Installation
- Configuration
- PSR evaluation (REQ-CS-007)
- Usage — including Customising the admin chrome (UiKit layout and theme; no page copies)
- Templates — panel pages → UiKit scaffolds, view models, data blocks (REQ-UI-003)
- URL redirects
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
Tests and coverage
PHPUnit with 100% line coverage of production PHP under src/ (optional SeoKit bridge files excluded when SeoKit is not a require-dev dependency):
make test-coverage make coverage-check
License
MIT



