phil / reviews-bundle
Let members review a product, game or place: ratings by criteria, moderation, helpfulness votes and a fair Bayesian average, with verified-buyer marks.
Package info
github.com/parler-haut-interagir-librement/reviews-bundle
Type:symfony-bundle
pkg:composer/phil/reviews-bundle
Requires
- php: >=8.5
- ext-mbstring: *
- doctrine/dbal: ^4.6
- psr/clock: ^1.0
- psr/event-dispatcher: ^1.0
- psr/log: ^3.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/http-foundation: ^8.2
- symfony/http-kernel: ^8.2
- symfony/uid: ^8.2
Requires (Dev)
- ext-pdo: *
- doctrine/doctrine-bundle: ^3.3
- doctrine/orm: ^3.7
- phil/moderation-bundle: ^0.3@dev
- phil/privacy-bundle: ^0.3@dev
- phil/spam-protection-bundle: ^0.3@dev
- phil/structured-data: ^0.1@dev
- phil/ux-kit: ^0.5@dev
- phpunit/phpunit: ^13.4
- symfony/browser-kit: ^8.2
- symfony/cache: ^8.2
- symfony/clock: ^8.2
- symfony/console: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.2
- symfony/event-dispatcher: ^8.2
- symfony/event-dispatcher-contracts: ^3.6
- symfony/framework-bundle: ^8.2
- symfony/routing: ^8.2
- symfony/security-core: ^8.2
- symfony/security-csrf: ^8.2
- symfony/translation: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/ux-twig-component: ^3.7
- symfony/yaml: ^8.2
- twig/twig: ^3.21
Suggests
- doctrine/orm: For the tables added to the schema the ORM generates
- phil/moderation-bundle: To report reviews in the one queue of the moderation, and withdraw them under the published criteria
- phil/privacy-bundle: For the reviews, votes and responses in the export and the erasure of a member's data
- phil/rate-limit-bundle: To limit the review form and the votes through the rules named in the configuration
- phil/spam-protection-bundle: To hold the review form to a honeypot, a single-use token, a proof of work and content rules
- phil/structured-data: For the schema.org AggregateRating of a subject whose reviews were all collected on the site
- phil/ux-kit: For the recipes Rating, Button, Badge, Input, Checkbox and Textarea the pages draw, through the Symfony UX Toolkit
- symfony/asset-mapper: To serve the Stimulus controller of the votes without a build step
- symfony/console: For phil:reviews:recompute
- symfony/routing: For the pages of the reviews
- symfony/security-core: To name the current member from the authenticated user, and decide who responds
- symfony/security-csrf: For the forms of the pages
- symfony/twig-bundle: For the pages of the reviews
- symfony/ux-twig-component: For the recipes of the kit the pages draw
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-25 13:25:30 UTC
README
Moderated reviews and ratings of a product, game or place, with multi-criteria reviews and helpfulness votes from the first version.
phil/reviews-bundle is a Symfony bundle. A member gives a subject an overall score, the scores of the criteria its type declares, a text and up to three superlatives; the others vote on how helpful the review was; the merchant or the organiser responds publicly. The ratings of each subject — a weighted average published with its parameters, the average of each criterion, the superlatives given most often — are kept beside the reviews and computed again after every change.
- One review per member and subject, and one vote per member and review, decided by the unique constraints of the tables.
- Reviews reserved to the participants within a window, 30 days by default, and the mark « verified purchase » or « took part », through a port the commerce or the ticketing implements.
- Every review is published, the negative ones as the positive ones: a review is withdrawn only under a published criterion, and its author contests the withdrawal once, with their evidence.
- A review given against a compensation always says so.
- The reviews of a subject are suspended and resumed without losing those given.
- Reported through
phil/moderation-bundle, exported and erased throughphil/privacy-bundle, given as a schema.orgAggregateRatingthroughphil/structured-datawhen every review was collected on the site, the form held tophil/spam-protection-bundleandphil/rate-limit-bundlewhen they are installed. - Pages drawn with the recipes of the PHIL UX kit: stars read as text by screen readers, forms that work without JavaScript, and a Stimulus controller that sends the votes in the background.
Status
| Part | State |
|---|---|
Reviews, votes, responses, withdrawals and contests (Reviews) |
Implemented and tested |
Ratings, weighted average, ranking and phil:reviews:recompute (Ratings) |
Implemented and tested |
| DBAL stores and their schema listener | Implemented and tested |
| Moderation, privacy, structured data, spam protection and rate limits | Implemented and tested |
| Pages, Twig functions and the Stimulus controller of the votes | Implemented and tested |
Flex recipe (recipe/0.1) |
Implemented and tested |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, the tables and the pages. |
| Configuration | Every option, with an example. |
| Reviews | Writing and changing a review, votes, responses, participants, compensations, suspension. |
| Ratings | The weighted average and its parameters, criteria, superlatives, ranking, AggregateRating. |
| Moderation | The published criteria, reports, withdrawals, contests, spam protection and rate limits. |
| Pages | The routes, the templates, the recipes of the kit, accessibility and the Stimulus controller. |
| Privacy | The export and the erasure of a member's reviews, votes and responses. |
| Extension points | The ports to implement, the services to replace, the events, and when they are stable. |
| Testing | The bundle's tests. |
| Reference | Every class and service of the bundle. |
Quick start
// config/bundles.php Phil\ReviewsBundle\PhilReviewsBundle::class => ['all' => true],
# config/packages/phil_reviews.yaml phil_reviews: types: game: criteria: [rules, replayability] superlatives: [great-for-beginners, gorgeous, quick-to-teach] # config/routes/phil_reviews.yaml phil_reviews: resource: '@PhilReviewsBundle/config/routes.php' prefix: /reviews
The reviews of the game catan are then at /reviews/game/catan.
Requirements
PHP 8.5 or later, Symfony 8.2 or later and Doctrine DBAL 4.5 or later.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.