PHPackages                             devtrw/state-bridge-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. [Framework](/categories/framework)
4. /
5. devtrw/state-bridge-bundle

ActiveSymfony-bundle[Framework](/categories/framework)

devtrw/state-bridge-bundle
==========================

Provides a basic framework for sharing application state from a Symfony2 backend to a javascript (AngularJS in particular) frontend.

2231PHP

Since Jul 2Pushed 12y agoCompare

[ Source](https://github.com/devtrw/DevtrwStateBridgeBundle)[ Packagist](https://packagist.org/packages/devtrw/state-bridge-bundle)[ RSS](/packages/devtrw-state-bridge-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

DevtrwStateBridgeBundle
=======================

[](#devtrwstatebridgebundle)

[![Build Status](https://camo.githubusercontent.com/cf2f77d8df5af295f6533c8999ac1f290e25d56124f69122284061948c100b6a/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6465767472772f446576747277537461746542726964676542756e646c652e7376673f7374796c653d666c6174)](http://travis-ci.org/devtrw/DevtrwStateBridgeBundle)[![Code Quality](https://camo.githubusercontent.com/749974614dc38a4136046f4eda9058c2272a1ca1af2bcbe324eb7d37db2aa46d/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6465767472772f446576747277537461746542726964676542756e646c652e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/devtrw/DevtrwStateBridgeBundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ed0095f72b636c8ad1e451b9161b06e80b12a4de57dab7defa3f7961b9df284f/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6465767472772f446576747277537461746542726964676542756e646c652e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/devtrw/DevtrwStateBridgeBundle/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/1083c30631dd5b48f5489d8dca7206fefe0c3737b4ea48b0769a3f3707fe309c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32306461633634662d346538652d343832352d383330652d3038303639303934623439372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/20dac64f-4e8e-4825-830e-08069094b497)

This bundle provides a basic framework for dynamically creating [ui-router](https://github.com/angular-ui/ui-router) states from configuration in a symfony bundle. The main drive behind this is to allow for selective activation of parts of an AngularJS frontend based on a users roles within a symfony context.

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

[](#installation)

### Install Bundle

[](#install-bundle)

**TODO**

### Register the "jsonp" Request Format

[](#register-the-jsonp-request-format)

[How to register a new Request Format and Mime Type](http://symfony.com/doc/current/cookbook/request/mime_type.html)

Usage
-----

[](#usage)

### NOTE: Theses Docs are incomplete. I'll make an effort to fill them out once the API has solidified

[](#note-theses-docs-are-incomplete-ill-make-an-effort-to-fill-them-out-once-the-api-has-solidified)

**1. Define your states under the `devtrw_state_bridge.states` configuration key.**

See the configuration section below.

**2. Export the `devtrw_state_bridge_get_entity_state` and `devtrw_state_bridge_get_state` routes to your angular application.**

The [FOSJsRoutingBundle](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle) can handle dumping the routes along with the symfony router implemented in javascript. Simply wrap it with an angular module and you'll have easy access to any exported routes from within your angular app.

**3. Create an abstract state in angular that loads in the needed states**

You can get a general idea of how to do this by skimming over [this blog post](http://alexfeinberg.wordpress.com/2014/04/26/delay-load-anything-angular/) by Alex Feinberg.

Configuration
-------------

[](#configuration)

**TODO**

TODO
----

[](#todo)

\[ \] Wrap/Extend the FOSJsRoutingBundle to provide a more seamless integration with angular \[ \] Finish initial documentation

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e363753436e49a72017f8e0ab478f9f389a0bd422322ac47f765cb1a6990cee?d=identicon)[llwt](/maintainers/llwt)

---

Top Contributors

[![llwt](https://avatars.githubusercontent.com/u/1036428?v=4)](https://github.com/llwt "llwt (37 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

### Embed Badge

![Health badge](/badges/devtrw-state-bridge-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/devtrw-state-bridge-bundle/health.svg)](https://phpackages.com/packages/devtrw-state-bridge-bundle)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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