Search by

glitchr / omnireview

GlitchArt

Omnireview: what customers say of an establishment elsewhere - its rating, its reviews, replying as the establishment, inviting a customer to review, the link to leave one - whoever hosts them: Google (omnireview/google), Tripadvisor (omnireview/tripadvisor), Trustpilot (omnireview/trustpilot), each

1.x-dev 2026-10-15 13:14 UTC

This package is auto-updated.

Last update: 2026-10-15 13:23:19 UTC


README

One contract for what customers say of an establishment elsewhere - its rating, its reviews, replying as the establishment, inviting a customer to leave one, the link to write one - whoever hosts them: Google, Tripadvisor, Trustpilot.

$google = $registry->rating('google');                         // a gateway that gives a rating
$rating = $google->rating(new Place('ChIJLU7jZClu5kcR4PcOOO6p3I0'));
$rating->value; $rating->count; $rating->url;                  // 4.6, 128, the place on Google Maps

foreach ($registry->reviews('google')->reviews($place, 3) as $review) {
    $review->author; $review->publishedAt; $review->url;      // always shown with them
}
$registry->get('google')->terms();                             // how long it may be kept, how it must be credited

This package holds the contract (GatewayInterface and the capabilities it may give: RatingInterface, ReviewsInterface, ReplyInterface, InviteInterface, WriteUrlInterface; GatewayFactory, Registry), the models (Place, Rating, Review, Reply, Invitation, Terms, Capabilities), a bridge for Symfony and one for Twig. It needs no framework: PHP and symfony/http-client-contracts. Each platform is a package of its own:

Package Gives Kept Reviews per call
omnireview/google rating, reviews, write-url; reply with the owner's access never (the place ID only) 5 (Places), 50 (Business Profile, the owner)
omnireview/tripadvisor rating, reviews, write-url per Tripadvisor's Caching Policy, pages not indexed 5
omnireview/trustpilot rating, reviews, write-url; reply and invite with a business user 24 hours 100

Shown as theirs, never as the site's own

Each gateway declares its platform's terms (Terms): how long what it gives may be kept, how many reviews one call gives, what must be shown with it (the platform's name or logo, each author, a link back), whether pages that show it must stay out of search engines - read in each platform's documentation, with the address they were read at (Terms::$source).

The Twig bridge keeps to them: a rating and its reviews are always shown with their origin, their date and their link, kept in the cache no longer than the platform allows - and never as JSON-LD: reviews collected by a third party are not the site's to mark up as its own AggregateRating (see Google's review snippet guidelines).

Documentation

Plain PHP

composer require glitchr/omnireview omnireview/google
$registry = new Registry([new GoogleGatewayFactory()], [
    'google' => ['factory' => 'google', 'options' => ['api_key' => getenv('GOOGLE_PLACES_KEY'), 'language' => 'fr']],
]);

No bundle, no container: a factory per platform package, the registry built by hand.

Symfony

Omnireview\Bridge\Symfony\OmnireviewBundle does that wiring, and registers the Twig functions (docs/symfony.md); its components are not required by this package.

omnireview:
    gateways:
        google: { factory: google, options: { api_key: '%env(GOOGLE_PLACES_KEY)%', language: fr } }
{{ omnireview_widget('google', place_id) }}

Docker

cd docker && cp .env.dist .env
docker compose run --rm omnireview gateways
docker compose run --rm omnireview bare        # plain PHP: no bundle, no container, and what PHP loaded
docker compose run --rm omnireview test

Responsibility

glitchr/omnireview and its omnireview/* providers are independent, unofficial clients: none is affiliated with, endorsed by or sponsored by the services it reaches. Each service keeps its own terms (keys, display and attribution rules, caching limits, quotas), named with a link in the "Responsibility" section of the README of each provider that reaches one. The MIT licence covers this code only and grants no right to any service or to its data.

Whoever installs and runs these packages is responsible for complying with those terms, for obtaining whatever they require, and for any use made of what they return. The authors publish them free of charge, make no commercial use of them, and accept no liability for how they are used (see LICENSE).

License: MIT since 2026-10-09; earlier versions remain published under LGPL-3.0-or-later.