Download the PHP
package waaseyaa/mercure without Composer
On this page you can find all versions of the php package
waaseyaa/mercure. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor waaseyaa Package mercure Short Description Mercure hub publisher for real-time SSE push in Waaseyaa License
GPL-2.0-or-later
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Mercure hub publisher for real-time SSE push in Waaseyaa.
MercurePublisher POSTs JSON updates to a configured Mercure hub, minting a short-lived HS256 JWT (one-hour expiry) for each request. The token follows least privilege: its publish claim is scoped to the exact topic being published (publish: ['/notes/42']), never the ['*'] wildcard — so a leaked token cannot be used to publish to any other topic. The hub URL must be https://: the token is sent as a bearer header, so a non-https hub would leak it in cleartext and is therefore treated as unconfigured (the POST also pins CURLOPT_SSL_VERIFYPEER/VERIFYHOST). Publication is best-effort: when the hub URL is unconfigured/non-https or the JWT secret is unset, or the hub returns a non-2xx response, publish() returns false rather than throwing — so a failed broadcast never crashes the primary request, matching the framework convention for non-critical side effects. Pure side-effect utility — no entity storage, no global state.
Install
Ships as part of waaseyaa/framework; consumers get it via the core, cms, or full metapackage. To pull it on its own:
Requires PHP >= 8.5 and the cURL extension. MercureServiceProvider is auto-discovered (extra.waaseyaa.providers) and binds MercurePublisher as a container singleton, reading config['mercure']['hub_url'] and config['mercure']['jwt_secret'].
Registers MercurePublisher as a singleton from the mercure config block:
Usage
Resolve MercurePublisher from the container (or construct it directly) and push an update:
Because publish() is best-effort, you can call it unconditionally and ignore the return value in fire-and-forget paths — an unconfigured publisher simply returns false without side effects. Guard with isConfigured() (or inspect the boolean result) when you need to know whether the broadcast was actually attempted.
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package waaseyaa/mercure contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.