PHPackages                             ccc/star-rating-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. [Templating &amp; Views](/categories/templating)
4. /
5. ccc/star-rating-bundle

Abandoned → [https://github.com/nurikabe/StarRatingBundle](/?search=https%3A%2F%2Fgithub.com%2Fnurikabe%2FStarRatingBundle)Symfony-bundle[Templating &amp; Views](/categories/templating)

ccc/star-rating-bundle
======================

Symfony form type and Twig extension for quick integration of FyneWorks' Star Rating widget

2.0.1(11y ago)106.6k6[1 issues](https://github.com/nurikabe/StarRatingBundle/issues)MITPHPPHP &gt;=5.3.2

Since Jun 12Pushed 10y ago5 watchersCompare

[ Source](https://github.com/nurikabe/StarRatingBundle)[ Packagist](https://packagist.org/packages/ccc/star-rating-bundle)[ Docs](http://github.com/nurikabe/StarRatingBundle)[ RSS](/packages/ccc-star-rating-bundle/feed)WikiDiscussions master Synced 3w ago

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

NurikabeStarRatingBundle
========================

[](#nurikabestarratingbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/7e365acbade1e65fdf82249101cb66881da67cf8f1508e52d85aac0b1341288d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63386537623366662d623638632d343234612d393333612d3230393164623863666166612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/c8e7b3ff-b68c-424a-933a-2091db8cfafa)

Form type and Twig filter for FyneWorks' super fine jQuery [Star Rating Plugin](https://github.com/Fyneworks-jQuery/star-rating).

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

[](#installation)

### Manually add a repository for the Star Rating Plugin

[](#manually-add-a-repository-for-the-star-rating-plugin)

This is the easiest way to ensure that you have the Star Rating Plugin installed. Add a repository to `composer.json`:

```
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "fyneworks/star-rating",
                "version": "4.11.0",
                "source": {
                    "type": "git",
                    "url": "https://github.com/fyneworks/star-rating",
                    "reference": "4.11.0"
                }
            }
        }
    ]
```

### Add the library and bundle to your dependencies

[](#add-the-library-and-bundle-to-your-dependencies)

```
    "require": {
        "fyneworks/star-rating": "4.11.0",
        "nurikabe/star-rating-bundle": "~2.0.1",
        ...
    }
```

### Register the bundle in your kernel

[](#register-the-bundle-in-your-kernel)

```
public function registerBundles()
{
    $bundles = array(
        // ...
        new Nurikabe\StarRatingBundle\NurikabeStarRatingBundle(),
        // ...
    );
```

### Update your packages

[](#update-your-packages)

```
$ php composer.phar update nurikabe/star-rating-bundle
```

If you define a repository for `fyneworks/star-rating` as per the above then installing `nurikabe/star-rating-bundle`should also install the `fyneworks/star-rating` dependency.

Usage
-----

[](#usage)

Load the Star Rating plugin in your layout. For example, if you are using Assetic and you have installed Star Rating via Composer as per above:

```
{% stylesheets '@NurikabeStarRatingBundle/Resources/rating.css' %}

{% endstylesheets %}
{% javascripts '%kernel.root_dir%/../vendor/fyneworks/star-rating/jquery.rating.js' %}

{% endjavascripts %}
```

Of course, remember to dump your assets if `use_controller` is off:

```
$ app/console assetic:dump
```

This bundle contains a new FormType `star_rating` field type:

```
$builder->add('rating', 'star_rating', array(
    'choices' => array(1 => 'ichi', 2  => 'ni', 3 => 'san', 4=> 'shi', 5 => 'go'),
    'expanded' => true,  // radio or checkbox...
    'multiple' => false  // ...but not checkbox
));
```

`star_rating` extends `choice` and will render expanded `choice` fields as a Star Rating field.

Original `choice` field:

[![before](Resources/doc/before.png)](Resources/doc/before.png)

As a `star_rating` field:

[![after](Resources/doc/after.png)](Resources/doc/after.png)

A Twig filter is also available that will render a static Star Rating widget given a numeric input:

```
{{ entity.rating|star_rating }}
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.8% 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 ~333 days

Total

3

Last Release

4098d ago

Major Versions

v1.0 → 2.0.02014-12-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d6ef04132ded978641abea255e050d1fc5f640de4df6dd8ec0acb7514ea7b03?d=identicon)[nurikabe](/maintainers/nurikabe)

---

Top Contributors

[![nurikabe](https://avatars.githubusercontent.com/u/83678?v=4)](https://github.com/nurikabe "nurikabe (30 commits)")[![CedCannes](https://avatars.githubusercontent.com/u/2522998?v=4)](https://github.com/CedCannes "CedCannes (1 commits)")

---

Tags

symfonytwigformstar-ratingfyneworks

### Embed Badge

![Health badge](/badges/ccc-star-rating-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ccc-star-rating-bundle/health.svg)](https://phpackages.com/packages/ccc-star-rating-bundle)
```

###  Alternatives

[nurikabe/star-rating-bundle

Symfony form type and Twig extension for quick integration of FyneWorks' Star Rating widget

103.1k](/packages/nurikabe-star-rating-bundle)[nucleos/antispam-bundle

This bundle provides some basic features to reduce spam in symfony forms.

52105.1k](/packages/nucleos-antispam-bundle)[boekkooi/jquery-validation-bundle

Jquery form validation bundle for symfony 2

2773.9k1](/packages/boekkooi-jquery-validation-bundle)[cg/kint-bundle

This bundle lets you use the Kint function in your Twig templates. Kint is a print\_r() replacement which produces a structured, collapsible and escaped output

21125.8k1](/packages/cg-kint-bundle)

PHPackages © 2026

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