PHPackages                             rollerworks/route-autofill-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rollerworks/route-autofill-bundle

AbandonedArchivedSymfony-bundle[API Development](/categories/api)

rollerworks/route-autofill-bundle
=================================

RouteAutofillBundle can auto-fill missing missing route-parameters when generating

v0.1.2(6y ago)0208MITPHPPHP ^7.1

Since Oct 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rollerworks-graveyard/route-autofill-bundle)[ Packagist](https://packagist.org/packages/rollerworks/route-autofill-bundle)[ RSS](/packages/rollerworks-route-autofill-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

RollerworksRouteAutofillBundle
==============================

[](#rollerworksrouteautofillbundle)

The RollerworksRouteAutofillBundle helps with generating routes that follow a shared prefix with parameters. All end-points at a deeper level always have the route-parameters of their prefix, and therefor can reuse these when generating a route that also has this same prefix.

For example: You are current at the following route `/webhosting/{account}/ftp/users/`and want to generate a URL back to `/webhosting/{account}/`. Because the current page already has a value for `{account}`, we can easily reuse this.

**Tip:** This technique also works for host-requirements.

But there is more, this bundle also provides a `RouteRedirectResponse` to generate a redirect response for a route with ease.

What's this good for?
---------------------

[](#whats-this-good-for)

Their are times when you cannot provide the required route-parameters, or simply don't want to be bothered with these details.

The main purpose of this bundle is convenience, you can always solve these challenges differently but that also requires more work.

Requirements
------------

[](#requirements)

You need at least PHP 7.1 and the Symfony FrameworkBundle.

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ php composer.phar require rollerworks/route-autowiring-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Basic usage
-----------

[](#basic-usage)

First of auto-filling the route parameters does not happen automatically, only when you use the `AutoFilledUrlGenerator` *(compatible with the Symfony Routing system)* auto-filling is provided.

`$container->get(AutoFilledUrlGenerator::class);`

**Note:** The `RouteRedirectResponse` already uses this route-generator.

Secondly, you need to set the `autofill_variables` option for your routes to enable the auto-filling of specific parameters.

**Caution:** This option must be set per route, provide either an array or a string with named separated by a `,` (`account,id`).

### RouteRedirectResponse

[](#routeredirectresponse)

The RouteRedirectResponse is provided to directly generate a redirect response for a route:

```
use Rollerworks\Bundle\RouteAutofillBundle\Response\RouteRedirectResponse;

// (string $route, array $parameters = [], int $status = 302)
return new RouteRedirectResponse('route-name');
```

That's it.

#### Flash messages

[](#flash-messages)

Additionally you can add [flash messages](https://symfony.com/doc/current/controller.html#flash-messages) directly at the response.

```
return RouteRedirectResponse::toRoute('route-name')
    ->withFlash('success', 'translation.id', 'arguments');
```

When the arguments are empty (null) the message is past added to FlashBag as a string, otherwise it's an array like `['message' => 'message.id' => ['id' => 200]]`.

Translations and special formatting must still be done in the template. The `withFlash()` method can be called multiple times if needed.

License
-------

[](#license)

All contents of this package are released under the [MIT license](LICENSE).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~211 days

Total

3

Last Release

2399d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0e812c04e848e9cc3afe6e966d2b81e81308124d96ce5f54eff4db0f8db0ea9?d=identicon)[sstok](/maintainers/sstok)

---

Top Contributors

[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (11 commits)")

---

Tags

phprollerworksroutingsymfony-bundle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rollerworks-route-autofill-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rollerworks-route-autofill-bundle/health.svg)](https://phpackages.com/packages/rollerworks-route-autofill-bundle)
```

###  Alternatives

[symfony/web-profiler-bundle

Provides a development tool that gives detailed information about the execution of any request

2.3k156.8M1.2k](/packages/symfony-web-profiler-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/storefront

Storefront for Shopware

674.4M211](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
