PHP Package: symfony/mercure

Symfony Mercure is a real-time API and data updates package for PHP applications, enabling server-sent events and WebSocket communication.

Current Version: 0.6.5
Last Updated: 2024-04-08
PHP Requirement: >=7.1
Dependencies: symfony/framework-bundle, symfony/http-foundation, symfony/dependency-injection
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Symfony Mercure is a powerful real-time communication tool that allows seamless updates and notifications for PHP applications. It supports server-sent events and WebSocket protocols, making it a perfect choice for modern web applications that require instant data synchronization.

🔗 View on GitHub

Download Latest Version: 0.6.5

Download Download v0.6.5

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php

// Example from PHPlibraries.com
require_once 'libs/symfony/mercure/0.6.5/autoload.php';

use Symfony\Component\Mercure\Mercure;
use Symfony\Component\Mercure\Hub;
use Symfony\Component\Mercure\Publisher;
use Symfony\Component\Mercure\Subscriber;
use Symfony\Component\Mercure\Update;
use Symfony\Component\Mercure\UpdateBuilder;
use Symfony\Component\Mercure\Jwt\Token;
use Symfony\Component\Mercure\Jwt\TokenFactory;
use Symfony\Component\Mercure\Jwt\TokenProvider;


$obj = new Symfony\Component\Mercure\Mercure();
echo "✅ Example created successfully.";

?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.