Download the PHP package pikoman/compat-php without Composer
On this page you can find all versions of the php package pikoman/compat-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pikoman/compat-php
More information about pikoman/compat-php
Files in pikoman/compat-php
Package compat-php
Short Description Pusher's PHP library (pusher/pusher-php-server) on Pikoman: the same trigger, triggerBatch and authorizeChannel, signed with Ed25519 keys.
License MIT
Homepage https://pikoman.se/switch-from-pusher/
Informations about the package compat-php
pikoman/compat-php
Move a PHP backend from Pusher's library (pusher/pusher-php-server) to
Pikoman by changing the use line and your keys. trigger,
triggerBatch, authorizeChannel and authorizePresenceChannel take the same arguments and
give the same answers, so the code that calls them, your auth endpoint included, stays as it is.
PHP 8.2 or later with the curl, openssl and sodium extensions. For Laravel, use
pikoman/compat-laravel, which is built
on this.
The three keys are in Pikoman's dashboard; left out, they are read from PIKOMAN_APP,
PIKOMAN_API_KEY and PIKOMAN_PRIVATE_KEY. Nothing is signed with a shared secret: the API key
signs each request and the private key signs join tokens, and Pikoman only holds the public halves.
Pusher's options cluster, useTLS, host, port, scheme and timeout are ignored, so
yours can stay.
Unchanged:
In the browser, import Pusher from "@pikoman/compat" in place of pusher-js
(npm).
What it covers
triggerto one channel or up to 100, andtriggerBatch, each in one request that reaches all of its channels or none. Data is encoded as Pusher's library encodes it: text arrives as text unless you pass$already_encoded = true.socket_id(keep an event from the sender's page) for data that is an object.- Private, presence and
private-encrypted-channels. For encrypted channels, pass['encryption_master_key_base64' => ...]as the fourth argument, as with Pusher, or setPIKOMAN_ENCRYPTION_KEY: 32 random bytes, base64, kept by your backend and never sent to Pikoman. socketAuth,socket_auth,presenceAuthandpresence_auth, the names of older versions.
Not yet: get, getChannelInfo, getChannels, getPresenceUsers, sendToUser,
authenticateUser, terminateUserConnections, the Async methods and webhook (Pikoman's
webhooks have their own format). Write to [email protected] if you need one of them.
Step by step for each kind of app: pikoman.se/switch-from-pusher. Source: github.com/pikomanse/compat-php.
MIT licensed.
All versions of compat-php with dependencies
ext-curl Version *
ext-json Version *
ext-openssl Version *
ext-sodium Version *