PHPackages                             rhysawd/review-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. rhysawd/review-bundle

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

rhysawd/review-bundle
=====================

Book review bundle for Symfony applications

027PHP

Since Nov 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/itsrhys754/ReviewBundle)[ Packagist](https://packagist.org/packages/rhysawd/review-bundle)[ RSS](/packages/rhysawd-review-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ReviewBundle
============

[](#reviewbundle)

A Symfony bundle for managing book reviews. This bundle provides a complete review system for books, including:

- Review submission with ratings
- Review moderation/approval system
- Upvote and downvote system
- Configurable rating ranges
- Integration with Symfony security for user management

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

[](#requirements)

- PHP 8.2 or higher
- Symfony 7.1 or higher
- Doctrine ORM 3.3 or higher

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

[](#installation)

1. Install the bundle using Composer:

```
composer require rhysawd/review-bundle:@dev
```

2. Ensure the bundle has been added to your application's kernel in `config/bundles.php`:

```
return [
    // ...
    Rhys\ReviewBundle\ReviewBundle::class => ['all' => true],
];
```

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

[](#configuration)

1. Create the review configuration file at `config/packages/review.yaml`:

```
review:
    approval:
        auto_approve: false    # Set to true to auto-approve all reviews
        min_rating: 0         # Minimum allowed rating
        max_rating: 10        # Maximum allowed rating
```

2. Configure Doctrine mapping in `config/packages/doctrine.yaml`:

```
doctrine:
    orm:
        mappings:
            ReviewBundle:
                type: attribute
                is_bundle: false
                dir: 'vendor/rhysawd/review-bundle/src/Entity'
                prefix: 'Rhys\ReviewBundle\Entity'
                alias: RhysReviewBundle
```

3. Add the bundle's routes to `config/routes.yaml`:

```
review_bundle:
    resource: '@ReviewBundle/Resources/config/routes.yaml'
```

4. Update your database schema:

```
php bin/console doctrine:schema:update --force
```

Usage
-----

[](#usage)

### Adding Review Form to Book Pages

[](#adding-review-form-to-book-pages)

Add the review form to your book detail template:

```
{# templates/book/show.html.twig #}
{{ render(controller('Rhys\\ReviewBundle\\Controller\\ReviewController::new', { 'bookId': book.id })) }}
```

### Managing Reviews

[](#managing-reviews)

The bundle provides routes for:

- Submitting new reviews: `/book/{bookId}/review/new`
- Viewing reviews: `/book/{bookId}/reviews`
- Moderating reviews (admin): `/admin/reviews`

### Customising Templates

[](#customising-templates)

To override the default templates, create your own versions in:

```
templates/bundles/ReviewBundle/review/

```

Available templates to override:

- `form.html.twig` - The review submission form

Entity Relations
----------------

[](#entity-relations)

The bundle expects your Book entity to implement the following relationship:

```
use Rhys\ReviewBundle\Entity\Review;
use Doctrine\Common\Collections\Collection;

class Book
{
    /**
     * @var Collection
     */
    #[ORM\OneToMany(targetEntity: Review::class, mappedBy: 'book', orphanRemoval: true)]
    private Collection $reviews;

    // ... getters and setters
}
```

And your User entity:

```
use Rhys\ReviewBundle\Entity\Review;
use Doctrine\Common\Collections\Collection;

class User
{
    /**
     * @var Collection
     */
    #[ORM\OneToMany(targetEntity: Review::class, mappedBy: 'user', orphanRemoval: true)]
    private Collection $reviews;

    // ... getters and setters
}
```

Events
------

[](#events)

The bundle dispatches the following events:

- `review.approved` - When a review is approved

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This bundle is released under the MIT license. See the included [LICENSE](LICENSE) file for more information.

Support
-------

[](#support)

If you find a bug or want to suggest an improvement, please create an issue on the [GitHub repository](https://github.com/itsrhys754/ReviewBundle).

```

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ee71f4ec4355c9b18f89b4f26822cb7aa414f2d2c44a1df1e1003de97e23b74?d=identicon)[utdrhys](/maintainers/utdrhys)

---

Top Contributors

[![itsrhys754](https://avatars.githubusercontent.com/u/88214579?v=4)](https://github.com/itsrhys754 "itsrhys754 (21 commits)")

### Embed Badge

![Health badge](/badges/rhysawd-review-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/rhysawd-review-bundle/health.svg)](https://phpackages.com/packages/rhysawd-review-bundle)
```

PHPackages © 2026

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