Weave Code
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

core23/shariff-bundle

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Symfony/Sonata Integration: The bundle is designed specifically for Symfony applications using SonataProject, a popular admin bundle ecosystem. If the application leverages SonataProject, this provides a tight architectural fit for Shariff (a privacy-friendly alternative to traditional social sharing buttons).
  • Laravel Compatibility: Since Laravel is not Symfony, direct integration is not natively supported, but the underlying Shariff library (https://github.com/eggerapps/shariff) is framework-agnostic. A custom Laravel wrapper would be needed.
  • Modularity: The bundle follows Symfony’s Bundle pattern, which is modular and non-intrusive, making it easier to adopt in a Laravel context if abstracted properly.

Integration Feasibility

  • Shariff Core Functionality: The bundle wraps Shariff’s core features (privacy-compliant sharing buttons, GDPR compliance, no third-party tracking). This is highly valuable for Laravel apps needing GDPR/CCPA compliance.
  • Twig Integration: The bundle relies on Twig templating, which Laravel does not natively use (Blade is the default). A Blade-to-Twig adapter or direct Shariff JS integration would be required.
  • Configuration Overhead: The bundle expects Symfony’s config.yml or YAML/XML-based configuration. Laravel’s config.php would need mapping or a custom facade for compatibility.

Technical Risk

  • High: Due to Symfony-specific dependencies (SonataProject, Twig, Symfony DI), direct Laravel adoption introduces:
    • Framework mismatch (Symfony vs. Laravel).
    • Templating engine conflict (Twig vs. Blade).
    • Service container differences (Symfony’s DI vs. Laravel’s IoC).
  • Mitigation:
    • Use Shariff’s standalone JS and bypass the bundle entirely (lowest risk).
    • Build a Laravel-specific package that reimplements the bundle’s logic without Symfony dependencies (moderate risk).
    • Fork and adapt the bundle (highest risk, maintenance burden).

Key Questions

  1. Is GDPR/privacy compliance a critical requirement? (If yes, Shariff’s value justifies effort.)
  2. Does the app use SonataProject? (If yes, consider Symfony migration; if no, avoid the bundle.)
  3. Is Twig support mandatory? (If not, direct Shariff JS integration is simpler.)
  4. What’s the team’s comfort level with Symfony/Laravel interop? (Affects feasibility of custom wrapper.)
  5. Are there existing Shariff alternatives in Laravel? (E.g., laravel-shariff or custom Blade components.)

Integration Approach

Stack Fit

  • Laravel’s Native Alternatives:
    • Direct Shariff JS: Minimal effort, no bundle needed (recommended for simplicity).
    • Blade Components: Create a custom shariff.blade.php component with inline JS.
    • Laravel Packages: Prefer existing Laravel-compatible packages (e.g., beberlei/laravel-shariff) over Symfony bundles.
  • Symfony Stack:
    • If the app already uses SonataProject, evaluate partial Symfony migration or dual-stack integration (high complexity).

Migration Path

Approach Effort Risk Laravel-Friendly? Notes
Direct Shariff JS Low Low ✅ Yes No bundle, minimal changes.
Custom Laravel Wrapper Medium Medium ✅ Yes Reimplement bundle logic in Laravel.
Symfony Bundle Fork High High ❌ No Heavy maintenance burden.
Hybrid (JS + Config) Medium Low ✅ Yes Use Shariff JS + Laravel config files.

Recommended Path:

  1. Start with direct Shariff JS (lowest risk).
  2. If configuration management is needed, build a lightweight Laravel service provider to handle Shariff settings.
  3. Avoid the Symfony bundle unless the app is already Symfony-based.

Compatibility

  • Shariff Core: Fully compatible (framework-agnostic JS).
  • Symfony-Specific Features:
    • Twig templates: Require Blade conversion or JS-only fallback.
    • SonataAdmin integration: Not applicable in Laravel; would need custom admin panel logic.
    • Dependency Injection: Symfony’s DI would need Laravel’s bind() or app()->singleton() equivalents.

Sequencing

  1. Assess Requirements:
    • Confirm if Shariff’s privacy features are non-negotiable.
    • Check if existing social sharing solutions (e.g., AddThis, ShareThis) are acceptable.
  2. Prototype:
    • Test direct Shariff JS integration in a staging environment.
    • Validate GDPR compliance and UX.
  3. Package Evaluation:
    • If more control is needed, build a minimal Laravel package (e.g., vendor/package-shariff).
  4. Deprecation Plan:
    • If using the Symfony bundle, plan for future migration to a Laravel-native solution.

Operational Impact

Maintenance

  • Direct JS Integration:
    • Pros: No PHP maintenance, updates via Shariff’s CDN.
    • Cons: Manual JS updates if Shariff changes.
  • Custom Laravel Package:
    • Pros: Centralized config, easier updates.
    • Cons: Additional package to maintain (tests, docs, releases).
  • Symfony Bundle:
    • High Maintenance Burden: Requires Symfony expertise, potential for drift from upstream.

Support

  • Community:
    • Shariff: Actively maintained (GitHub stars, recent commits).
    • Symfony Bundle: Abandoned (last release 2021, archived).
  • Debugging:
    • Laravel devs may lack Symfony knowledge, complicating bundle debugging.
    • Direct JS integration reduces support overhead.

Scaling

  • Performance:
    • Shariff JS is client-side only; no server impact.
    • Custom Laravel package adds minimal overhead (config loading).
  • Traffic:
    • Shariff’s CDN handles sharing button loads; no Laravel scaling concerns.

Failure Modes

Risk Impact Mitigation
Bundle Abandonment No updates, security risks. Avoid; use direct JS or custom pkg.
Symfony-Laravel Conflicts Breaking changes in DI/Twig. Isolate bundle in a micro-service or avoid.
Shariff JS Breaking Changes Button rendering fails. Monitor Shariff releases; test updates.
GDPR Non-Compliance Legal penalties. Validate Shariff’s compliance; audit implementation.

Ramp-Up

  • For Developers:
    • Direct JS: 1–2 hours (add script tag, configure buttons).
    • Custom Package: 1–3 days (build provider, Blade components, tests).
    • Symfony Bundle: 1–2 weeks (learn Symfony DI, Twig, Sonata).
  • For PMs:
    • Decision Time: 1 day (evaluate alternatives).
    • Implementation Time: 3–5 days (prototype + validation).
  • Training Needed:
    • Shariff Configuration: Basic JS/CSS knowledge.
    • Laravel Package Development: If building a custom solution.
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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui