PHPackages                             ideato/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. ideato/star-rating-bundle

ActiveSymfony-bundle

ideato/star-rating-bundle
=========================

Symfony Bundle for simple Star Rating System

3670[1 issues](https://github.com/ideatosrl/StarRatingBundle/issues)JavaScript

Since Aug 1Pushed 11y ago4 watchersCompare

[ Source](https://github.com/ideatosrl/StarRatingBundle)[ Packagist](https://packagist.org/packages/ideato/star-rating-bundle)[ RSS](/packages/ideato-star-rating-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

StarRatingBundle
================

[](#starratingbundle)

**StarRatingBundle** is a Symfony Bundle for easy star rating system. **StarRatingBundle** can be used with your own Javascript library but it also includes [jQuery Raty](https://github.com/wbotelhos/raty) plugin if you'd like to install and use the bundle as-it-is.

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

[](#installation)

- Install the bundle via Composer:

    ```
      composer require ideato/star-rating-bundle "dev-master"

    ```
- Add the IdeatoStarRatingBundle to your application kernel:

    ```
      // app/AppKernel.php
      public function registerBundles()
      {
      		return array(
      			// ...
      			new Ideato\StarRatingBundle\IdeatoStarRatingBundle(),
      			// ...
      		);
      }

    ```
- Update the database schema with Doctrine:

    ```
      app/console doctrine:schema:update --force

    ```
- Include the routing configuration:

    ```
      #app/config/routing.yml
      _ideato_starrating:
          resource: "@IdeatoStarRatingBundle/Resources/config/routing.yml"

    ```

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

[](#configuration)

In order to include static files in case of you want to use [jQuery Raty](https://github.com/wbotelhos/raty) plugin included, you need to:

- Add the bundle within the allowed Assetic bundles:

    ```
      #app/config.yml
      assetic:
      	#...
      	bundles:        [ IdeatoStarRatingBundle ]

    ```
- Load static files:

    ```
      {% javascripts
      	'//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'
      	'@IdeatoStarRatingBundle/Resources/public/jquery.raty.js'
      	'@IdeatoStarRatingBundle/Resources/public/jquery.starrating.js'
      %}

      {% endjavascripts %}

      {% stylesheets
      	"@IdeatoStarRatingBundle/Resources/public/jquery.raty.css" filter="cssrewrite" %}

      {% endstylesheets %}

    ```
- Install the assets and regenerate static files:

    ```
      app/console assets:install web
      app/console assetic:dump

    ```

Usage
-----

[](#usage)

If you chose to use the jQuery plugin included, you simply need to render the star rating controller in your pages:

```
	{{ render(
		controller( "IdeatoStarRatingBundle:StarRating:displayRate", {
			contentId: post.id
		})
	) }}

```

You just need to customize the `contentId` param according to the id of your element. The controller automatically will render the rating stars with the current score enabled. Something like the following screenshot:

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

In this way everything is already enabled and users can start to rate your resources.

### Bonus

[](#bonus)

You can completely rewrite the rating logic within the [jquery.starrating.js](Resources/public/jquery.starrating.js). The easiest way is to copy and paste the file within your bundle and use your own Javascript file.

TODO
----

[](#todo)

- Add new table for registering single rate
- Prevent multiple vote

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![dymissy](https://avatars.githubusercontent.com/u/485213?v=4)](https://github.com/dymissy "dymissy (15 commits)")[![fullo](https://avatars.githubusercontent.com/u/8750?v=4)](https://github.com/fullo "fullo (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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