PHPackages                             nucleos/shariff-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. nucleos/shariff-bundle

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

nucleos/shariff-bundle
======================

This bundle provides shariff integration in symfony applications

5.1.1(5y ago)52.0k4[2 issues](https://github.com/nucleos/NucleosShariffBundle/issues)MITPHPPHP ^7.3

Since Oct 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nucleos/NucleosShariffBundle)[ Packagist](https://packagist.org/packages/nucleos/shariff-bundle)[ Docs](https://nucleos.rocks)[ GitHub Sponsors](https://github.com/sponsors/core23)[ Fund](https://ko-fi.com/core23)[ RSS](/packages/nucleos-shariff-bundle/feed)WikiDiscussions 3.4.x Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (31)Used By (0)

NucleosShariffBundle
====================

[](#nucleosshariffbundle)

[![Latest Stable Version](https://camo.githubusercontent.com/373a1642659dcef426e107a57cce509151c90ec3c20496dfeda3f1aed15d9881/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f762f737461626c65)](https://packagist.org/packages/nucleos/shariff-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/c2ca0c526774c9dbca5fbbedc6077baab62d1330a482a26810801d658dbdfff3/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/nucleos/shariff-bundle)[![License](https://camo.githubusercontent.com/9de8c358a7def3156c2d2d5a7957b18617892610d592e3dfd0e22f195e4271ff/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f6c6963656e7365)](https://packagist.org/packages/nucleos/shariff-bundle)

[![Total Downloads](https://camo.githubusercontent.com/fa298b1476ebb15ba19f8ba992c4219b3f4a4e434f440a3b25517196078b03a4/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/nucleos/shariff-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/914ea07d9f2e5afd7cc8245f70baf5ab4c91d178c75697716447092d69565a50/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f642f6d6f6e74686c79)](https://packagist.org/packages/nucleos/shariff-bundle)[![Daily Downloads](https://camo.githubusercontent.com/264e84dd3ce71ed7472acc4a402e7fd5eb315e36df8f1e5a966fe67c6b0a78a9/68747470733a2f2f706f7365722e707567782e6f72672f6e75636c656f732f736861726966662d62756e646c652f642f6461696c79)](https://packagist.org/packages/nucleos/shariff-bundle)

[![Continuous Integration](https://github.com/nucleos/NucleosShariffBundle/workflows/Continuous%20Integration/badge.svg?event=push)](https://github.com/nucleos/NucleosShariffBundle/actions?query=workflow%3A%22Continuous+Integration%22+event%3Apush)[![Code Coverage](https://camo.githubusercontent.com/b960af46852842d77555864392d4380f2ac95b6390c4633753f51cb696ed42af/68747470733a2f2f636f6465636f762e696f2f67682f6e75636c656f732f4e75636c656f735368617269666642756e646c652f67726170682f62616467652e737667)](https://codecov.io/gh/nucleos/NucleosShariffBundle)[![Type Coverage](https://camo.githubusercontent.com/288634b506b8fbf24b14c08cdfc0ea0af5b5c2ea1c8dc2567c7207673bc81834/68747470733a2f2f73686570686572642e6465762f6769746875622f6e75636c656f732f4e75636c656f735368617269666642756e646c652f636f7665726167652e737667)](https://shepherd.dev/github/nucleos/NucleosShariffBundle)

This bundle provides a wrapper for using [shariff](https://github.com/heiseonline/shariff) inside the symfony sonata-project.

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

[](#installation)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require nucleos/shariff-bundle

```

### Enable the Bundle

[](#enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Nucleos\ShariffBundle\NucleosShariffBundle::class => ['all' => true],
];
```

Define cache, http client and request factory:

```
# config/routes/nucleos_shariff.yaml

framework:
    cache:
        pools:
            cache.shariff:
                adapter: cache.adapter.filesystem

nucleos_shariff:
    cache: 'cache.shariff'
    http_client: 'some.http.client'         # e.g httplug.client
    request_factory: 'some.request.factory' # e.g. nyholm.psr7.psr17_factory

```

### Assets

[](#assets)

It is recommended to use [webpack](https://webpack.js.org/) / [webpack-encore](https://github.com/symfony/webpack-encore)to include the `shariff.js` and `shariff.css` file in your page.

You can use [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) to load the library:

```
npm install shariff

```

```
yarn add shariff

```

### Configure the Bundle

[](#configure-the-bundle)

Create a configuration file called `nucleos_shariff.yaml`:

```
# config/routes/nucleos_shariff.yaml

nucleos_shariff:
    resource: "@NucleosShariffBundle/Resources/config/routing/backend.yml"
```

Create a configuration file called `framework_cache.yaml`:

```
framework:
    cache:
        pools:
            cache.shariff:
                adapter: cache.adapter.filesystem
```

Usage
-----

[](#usage)

```
{# template.twig #}

{{ sonata_block_render({ 'type': 'nucleos_shariff.block.share' }, {
    'url': 'https://example.com/site.html'
}) }}
```

### Configure the Bundle

[](#configure-the-bundle-1)

You can globally configure the services that should count the likes or favorites for a page.

```
nucleos_shariff:
    cache: 'cache.shariff'
    http_client: 'some.http.client'
    request_factory: 'some.request.factory'

    options:
        domains: [ ] # Allow specific domains for shariff
        services: [ 'addthis', 'buffer', 'facebook', 'pinterest', 'reddit', 'stumbleupon', 'vk', 'xing' ]

    services:
        facebook:
            app_id:  "1234567890"
            secret:  "GENERATEDSECRET"
            version: "5.0"
```

This is a fork of [shariff-php](https://github.com/heiseonline/shariff-backend-php) with a more modern and dynamic solution.

License
-------

[](#license)

This bundle is under the [MIT license](LICENSE.md).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~133 days

Recently: every ~186 days

Total

21

Last Release

1178d ago

Major Versions

1.2.0 → 2.0.02017-09-14

2.0.0 → 3.0.02018-09-29

3.0.1 → 4.0.02019-03-17

4.0.0 → 5.0.02020-10-23

PHP version history (7 changes)1.1.2PHP ^5.6 || ^7.0

1.2.0PHP ^7.0

2.0.0PHP ^7.1

4.0.0PHP ^7.2

5.0.0PHP ^7.3

3.2.0PHP ^7.3 || ^8.0

3.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/46179d0f1a863a1a71c634a413d857f8428ad9a8273cd065ba4f0e864730dde9?d=identicon)[core23](/maintainers/core23)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (652 commits)")[![nucleos-bot](https://avatars.githubusercontent.com/u/60489587?v=4)](https://github.com/nucleos-bot "nucleos-bot (596 commits)")[![core23](https://avatars.githubusercontent.com/u/3440437?v=4)](https://github.com/core23 "core23 (441 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (42 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (11 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![n3o77](https://avatars.githubusercontent.com/u/321891?v=4)](https://github.com/n3o77 "n3o77 (1 commits)")

---

Tags

bundlehacktoberfestphpshariffsonatasonata-blocksymfonysymfony-bundlesymfonybundlefacebookgoogletwitterwidgetsonatashariffheisesonata-block

### Embed Badge

![Health badge](/badges/nucleos-shariff-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sonata-project/admin-bundle

The missing Symfony Admin Generator

2.1k19.0M299](/packages/sonata-project-admin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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