PHPackages                             emanueleminotto/gravatar-service-provider - 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. emanueleminotto/gravatar-service-provider

ActiveLibrary[Templating &amp; Views](/categories/templating)

emanueleminotto/gravatar-service-provider
=========================================

Gravatar Service Provider for Silex

1.0.0(11y ago)069MITPHP

Since Feb 4Pushed 10y ago1 watchersCompare

[ Source](https://github.com/EmanueleMinotto/GravatarServiceProvider)[ Packagist](https://packagist.org/packages/emanueleminotto/gravatar-service-provider)[ RSS](/packages/emanueleminotto-gravatar-service-provider/feed)WikiDiscussions master Synced 1mo ago

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

Gravatar Service Provider
=========================

[](#gravatar-service-provider)

[![Build Status](https://camo.githubusercontent.com/1985be4c7ecf3719fa8c242764166f23463119fb972c64500fd76e7006c6a2f2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f456d616e75656c654d696e6f74746f2f47726176617461725365727669636550726f76696465722e7376673f7374796c653d666c6174)](https://travis-ci.org/EmanueleMinotto/GravatarServiceProvider)[![SensioLabs Insight](https://camo.githubusercontent.com/f052f97562defc08412f0a0d0e7d0791af7ba0511d30792c325199fb906f444c/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f38373662383664372d343239642d343239642d396230312d3037663031663232343364662e7376673f7374796c653d666c6174)](https://insight.sensiolabs.com/projects/876b86d7-429d-429d-9b01-07f01f2243df)[![Coverage Status](https://camo.githubusercontent.com/2c0c6104df750a4ceb4c906f3dc044efb6f726db3e38c3d1b0c142fee19ab9a1/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f456d616e75656c654d696e6f74746f2f47726176617461725365727669636550726f76696465722e7376673f7374796c653d666c6174)](https://coveralls.io/r/EmanueleMinotto/GravatarServiceProvider)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6a629785d0c06aa91e1d5faf8cc686568420a55ddeb193adc8c20951fffc03f8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f456d616e75656c654d696e6f74746f2f47726176617461725365727669636550726f76696465722e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/EmanueleMinotto/GravatarServiceProvider/)[![Total Downloads](https://camo.githubusercontent.com/45c83c50be3f7c7d450495cd24d01bb2c97ae0fee7d57f4a3afb38a249e4e3fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d616e75656c656d696e6f74746f2f67726176617461722d736572766963652d70726f76696465722e7376673f7374796c653d666c6174)](https://packagist.org/packages/emanueleminotto/gravatar-service-provider)

A [Gravatar](http://www.gravatar.com) service provider for [Silex](http://silex.sensiolabs.org/).

API: [emanueleminotto.github.io/GravatarServiceProvider](http://emanueleminotto.github.io/GravatarServiceProvider/)

Install
-------

[](#install)

Install Silex using [Composer](http://getcomposer.org/).

Install the GravatarServiceProvider adding `emanueleminotto/gravatar-service-provider` to your composer.json or from CLI:

```
$ composer require emanueleminotto/gravatar-service-provider

```

Usage
-----

[](#usage)

Initialize it using `register`

```
use EmanueleMinotto\GravatarServiceProvider\GravatarServiceProvider;

$app->register(new GravatarServiceProvider(), array(
    'gravatar.http_client' => new GuzzleHttp\Client(), // default null, optional
    'gravatar.twig' => false, // default true, optional
));
```

The `gravatar.http_client` can be replaced by an instance of the [Guzzle](http://docs.guzzlephp.org/en/latest/) HTTP client, by default a new instance is provided.

From PHP

```
$app->get('/hello/{email}', function ($email) use ($app) {
    $profile = $app['gravatar']->getProfile($email);

    return 'Hello ' . $profile['preferredUsername'];
});
```

From [Twig](http://twig.sensiolabs.org/)

Setting the option `gravatar.twig => true`, if there's the [Twig service provider](http://silex.sensiolabs.org/doc/providers/twig.html), you'll be able to use the [Twig extension](https://github.com/EmanueleMinotto/Gravatar#twig-extension) provided by the [Gravatar library](https://github.com/EmanueleMinotto/Gravatar).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4116d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b6fbd038f22a54716027eb7ce30c6cafd8e59c138ae58b3c2516c34ccfef7f?d=identicon)[EmanueleMinotto](/maintainers/EmanueleMinotto)

---

Top Contributors

[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (9 commits)")

---

Tags

twigservice providersilexgravatar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/emanueleminotto-gravatar-service-provider/health.svg)

```
[![Health](https://phpackages.com/badges/emanueleminotto-gravatar-service-provider/health.svg)](https://phpackages.com/packages/emanueleminotto-gravatar-service-provider)
```

###  Alternatives

[thomaswelton/gravatarlib

A lightweight PHP 5.3 OOP library providing easy gravatar integration.

251.1M5](/packages/thomaswelton-gravatarlib)

PHPackages © 2026

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