PHPackages                             xactsystems/js-routing-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. xactsystems/js-routing-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

xactsystems/js-routing-bundle
=============================

A JS routing bundle for Symfony 4+ using webpack. Derived from the FOS JSRoutingBundle. See 3.4 branch for Symfony 3.4.

v5.0.0(1y ago)01.1k[1 PRs](https://github.com/XactSystems/js-routing-bundle/pulls)MITPHPPHP &gt;=8.1

Since May 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/XactSystems/js-routing-bundle)[ Packagist](https://packagist.org/packages/xactsystems/js-routing-bundle)[ RSS](/packages/xactsystems-js-routing-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (16)Versions (17)Used By (0)

XactJSRoutingBundle
===================

[](#xactjsroutingbundle)

This bundle allows you to expose your Symfony routes and use them in your webpack managed JavaScript code. It allows you to easily integrate the functionality of the FOSJsRoutingBundle into webpack modules.

Documentation
-------------

[](#documentation)

### 1) Add JSRoutingBundle to your project

[](#1-add-jsroutingbundle-to-your-project)

```
composer require xactsystems/js-routing-bundle
```

For Symfony 3.4 use:

```
composer require xactsystems/js-routing-bundle:^3.4
```

### 2) Include the routing template in your base Twig template

[](#2-include-the-routing-template-in-your-base-twig-template)

```
// templates/base.html.twig

{{ include("@XactJSRouting/js-routing.html.twig") }}
```

### 3) Include the JS module in your App.js

[](#3-include-the-js-module-in-your-appjs)

```
// assets/js/App.js

// Import the JS routing scripts
import '../../vendor/xactsystems/js-routing-bundle/assets/js-routing.js';
```

The actual path to the js-routing.js file may not be exactly as shown, you may need to adjust this for your own project.

### 4) Using the routing class, exactly as you would with FOS bundle

[](#4-using-the-routing-class-exactly-as-you-would-with-fos-bundle)

```
// Get the URL of your routes
let url1 = Routing.generate('home');
let url2 = Routing.generate('some-other-route', {id: myLocalId, state: myLocalState});
```

### 5) For Symfony 3.4, if you are not using Flex and ENV you may need to add the following:

[](#5-for-symfony-34-if-you-are-not-using-flex-and-env-you-may-need-to-add-the-following)

```
// app/AppKernel.php

    public function registerBundles()
    {
        // You many need to do this to get the render(controller()) Twig method working for XactJSRoutingBundle
        $_ENV["APP_ENV"] = $this->getEnvironment();
```

And for the Symfony Serializer component:

```
// app/config/config.yml

framework:
    ...
    # If you haven't already enabled the Symfony Serializer
    serializer: { enabled: true }
```

Credits
-------

[](#credits)

- Ian Foulds as the creator of this package.
- William DURAND as author of the FOS bundle.
- Julien MUETTON (Carpe Hora) for the inspiration.

License
-------

[](#license)

This bundle is released under the MIT license. See the complete license in the bundle:

[LICENSE](https://github.com/ianfoulds/js-routing-bundle/blob/master/LICENSE)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity73

Established project with proven stability

 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 ~106 days

Recently: every ~279 days

Total

16

Last Release

600d ago

Major Versions

1.0.2 → v4.4.02020-09-04

v3.4.4 → v4.4.32020-10-01

v3.4.5 → 4.4.42021-09-03

3.4.x-dev → 4.4.x-dev2021-10-29

4.4.x-dev → v5.0.02024-09-25

PHP version history (2 changes)v1.0.0PHP ^7.0

v5.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![ianef](https://avatars.githubusercontent.com/u/5128087?v=4)](https://github.com/ianef "ianef (107 commits)")

---

Tags

hacktoberfestroutingsymfonywebpack

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xactsystems-js-routing-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/xactsystems-js-routing-bundle/health.svg)](https://phpackages.com/packages/xactsystems-js-routing-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[pentatrion/vite-bundle

Vite integration for your Symfony app

2725.3M13](/packages/pentatrion-vite-bundle)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

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