Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Shariff Bundle Laravel Package

nucleos/shariff-bundle

Symfony bundle that integrates Shariff, the privacy-friendly social sharing buttons. Adds share buttons for popular networks without tracking users, with configurable services, templates, and styling. Easy to install and customize for Symfony applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor, with a fundamental mismatch. nucleos/shariff-bundle is a Symfony bundle, not a Laravel package. It ships Symfony-specific integration machinery: a DependencyInjection extension with a Configuration tree, service definitions wired to Symfony's container, a Twig extension, and a controller route for the Shariff share-count endpoint. Laravel has no bundle/container-extension equivalent — package discovery, config publishing, and routing are entirely different idioms. Nothing in this package can be composer required into a Laravel app and "just work."

What it actually does. Shariff (originally from Heise) is a privacy-preserving social share button set: buttons render client-side, and share counts are fetched server-side through a proxy endpoint so the visitor's browser never talks to Facebook/X/etc. The bundle is a thin Symfony adapter over the underlying heise/shariff PHP library — it registers the backend service, exposes a counts endpoint, provides config for the enabled networks, and injects the frontend assets. The genuinely reusable value is small: a service list, a route, and a Twig/Blade partial.

Technical risk — high, and disqualifying as a direct dependency.

  • Archived. No security patches, no PHP 8.2/8.3/8.4 support commitments, no Symfony 6/7 alignment. Last release December 2021.
  • Four stars, zero dependents. No production evidence, no community to absorb maintenance, no issue triage. Effectively a single-author artifact that has been abandoned.
  • Upstream API churn is the real hazard. Share-count endpoints are the most volatile part of this domain: X/Twitter removed public count access, Facebook has repeatedly restricted unauthenticated counting, Reddit and others have changed terms. A Shariff deployment from 2021 will have several dead or rate-limited backends today regardless of the wrapper's health.
  • Low intrinsic complexity cuts both ways. The package is small enough to reimplement, which means the dependency risk is entirely avoidable — the cost of adopting it (fork, own, upgrade) exceeds the cost of writing the equivalent Laravel-native glue.

Key questions for the requester:

  1. Is this a Laravel application? If yes, this package is out of scope by construction and the conversation should shift to the underlying library or a build-vs-buy decision.
  2. Do we actually need server-side share counts, or only privacy-friendly share buttons? If only buttons, the static Shariff JS + CSS assets require no PHP package at all, and the entire integration question evaporates.
  3. Which networks must be supported? That determines whether any maintained count backend even exists.
  4. Is there a compliance driver (GDPR/DSGVO, no third-party requests before consent)? Shariff's value proposition is legal, not functional — this changes the priority calculus.
  5. Is the team willing to own a fork indefinitely? If not, stop here.

Verdict: Not recommended for adoption. The bundle is unusable in Laravel, unmaintained everywhere, and its core capability is available more cheaply through the upstream JS assets plus a small in-house endpoint if counts are truly required.

Integration Approach

Stack fit — none as packaged. A Laravel integration would be a reimplementation of the bundle's responsibilities, not an installation of it. Concretely, a Laravel-native equivalent needs only: a config file listing enabled networks, a single controller action that proxies count requests through the heise/shariff backend, a cache layer in front of it, a Blade component that emits the Shariff markup and loads the static assets, and a route registration in a small service provider. That is a day or two of work and yields code the team owns outright.

Migration path. Treat this as an extraction, not a port:

  1. Decide on scope first. Client-side buttons only vs. buttons + server-proxied counts. This single decision eliminates roughly half the work if counts are dropped.
  2. Vendor the frontend. Take Shariff's static JS/CSS and the supported-services JSON from upstream and commit them to resources/ (or publish via Vite). No PHP dependency, no maintenance burden beyond the asset refresh.
  3. Build the backend only if counts are mandated. Either (a) wrap the still-published heise/shariff PHP library behind a Laravel controller — check its PHP constraint compatibility against the target Laravel version before committing — or (b) write per-network count fetchers directly for the two or three networks that still expose counts, which is likely less code than reconciling a stale dependency.
  4. Cache aggressively. Counts are stale-tolerant; a 15–60 minute cache per (network, URL) pair is essential to survive rate limits and to keep the endpoint off the request critical path.
  5. Port the presentational contract. If an existing Symfony frontend is being migrated, lift the Twig template's markup and config semantics so the visual output and network list match 1:1 — this is the only place the bundle is genuinely a useful reference.

Compatibility notes. The underlying library's PHP constraint is the gate. If it pins ^7.3 || ^8.0, it may install alongside a modern Laravel, but you inherit unpatched code on a supported runtime — acceptable only for an isolated, cached, read-only proxy. Do not let it into the dependency graph of anything that handles authentication or user data. Where the underlying library is the blocker, skip it entirely and implement the fetchers.

Sequencing. Spike the underlying library's installability (half a day) → confirm network coverage against current API reality (half a day, mostly desk research) → decide build vs. drop counts → implement assets + endpoint + cache → wire into templates behind a feature flag. Total realistic effort: 2–4 days including the discovery, which is a small fraction of the cost of owning an abandoned third-party dependency.

Operational Impact

Maintenance — the dominant cost, and it falls entirely on us. There is no upstream to receive fixes from: archived, four stars, zero dependents, last release December 2021. Any adoption is a permanent fork with an implicit "we are the maintainers" commitment. The bundle's own code is trivial; the liability is the surrounding surface — the count-fetching backends, their auth and rate-limit behavior, and the PHP version treadmill.

Support. None. No issue triage, no CVE response, no upgrade guidance. Internal documentation and a named owner are prerequisites, not nice-to-haves. Given the small code volume, the honest operational posture is "we wrote this ourselves and cite the bundle as prior art," which is a healthier position than "we depend on it."

Scaling. The endpoint is I/O-bound and trivially cacheable, so scaling is a caching problem, not a compute problem. Two constraints dominate: (1) upstream rate limits — an uncached endpoint will fail under any real traffic, and network per-request fan-out multiplies the exposure; (2) request amplification — one page view can trigger N network calls, so the cache key must be per-URL and the fetch should be non-blocking or pre-warmed. Keep the proxy off the render critical path; render buttons immediately and let counts populate asynchronously or from cache only.

Failure modes to design for:

  • Silent zeros. Upstream APIs frequently return empty or error responses that look like "0 shares." Without explicit error states, the UI will confidently display wrong numbers. Distinguish "unavailable" from "zero."
  • Dead networks. X/Twitter and others have withdrawn public counts; a network in the config may be permanently unserviceable. Make the network list configurable and expect it to shrink.
  • Upstream timeouts and 429s. Enforce short timeouts, circuit-break per network, and serve stale cache on failure rather than blocking.
  • Unpatched-code exposure. If the abandoned PHP library is in the path, assume no security response. Isolate it, restrict it to public read-only data, and log its behavior.
  • Asset drift. Vendored Shariff JS will age; button markup for some networks will break as providers change their share URL formats.

Ramp-up. Low for the code — a mid-level engineer can read the whole surface in an afternoon, and the Laravel-native reimplementation is straightforward. The non-obvious ramp-up is domain knowledge: which networks still expose counts, what the privacy/compliance requirement actually demands, and how counts should degrade. That knowledge lives with whoever owns the feature, and it needs to be written down, because the abandoned package will not teach it to the next engineer.

Bottom line for a TPM: the build-vs-buy math is inverted here — "buy" means adopting an unmaintained dependency with zero community and then owning it forever, while "build" is a two-to-four-day task using the same upstream assets. Budget the small build, credit the bundle as reference material for markup and config semantics, and do not add it to the dependency graph.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect