Download the PHP package wielorzeczownik/pepito-client without Composer
On this page you can find all versions of the php package wielorzeczownik/pepito-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wielorzeczownik/pepito-client
More information about wielorzeczownik/pepito-client
Files in wielorzeczownik/pepito-client
Package pepito-client
Short Description Pepito API client: SSE events, state, cache and historical statistics. Plain PHP, with the Rust core as opt-in FFI.
License MIT
Homepage https://github.com/wielorzeczownik/pepito-client#readme
Informations about the package pepito-client
pepito-client
Pepito API client for Rust (crate), JS/TS (npm) and PHP (Composer). The npm and Composer packages are plain TypeScript and plain PHP by default, with nothing native to install. The Rust core is there as an opt-in backend in both wasm under @wielorzeczownik/pepito-client/wasm, FFI through Client::withFfi().
Reaching for Rust as the shared core just to hand-roll FFI and wasm-bindgen for a cat-door tracker was probably overkill. Three thin implementations in their native languages turned out to be the better default, so that is what the JS and PHP packages ship now. The Rust core stayed, as a crate and as the opt-in backend.
Every implementation does SSE parsing, the Way/State/Update enums, the in/out state machine, dedup of repeats after a reconnect, an age-aware status cache, connection heartbeat checks, and statistics from the Clement87/Pepito-data archive.
The Rust core never touches the network. Transport belongs to the binding, which is why the same code runs in wasm (no sockets there) and in PHP. Each binding lives in its own crate so its dependencies never leak into the others: building for PHP does not compile wasm-bindgen, and the wasm build never touches reqwest.
The events, status(), the statistics and the snapshot JSON are the shared contract. Snapshots move freely between backends, so a cache written by the plain port restores in the Rust one and back. Parity tests keep the ports honest: js/tests runs the TS port against the wasm build and php/tests/BackendParityTest.php runs the PHP port against FFI, on the same stream, snapshots and the full archive.
Usage
Each package has its own README with installation and an example:
- crates/core/README.md: Rust / crates.io
- js/README.md: JS / TS / Node / npm
- php/README.md: PHP / Composer
Building
Only the Rust core and the opt-in backends need building. The default JS and PHP packages do not.
Tools needed only for building the bindings:
Disclaimer
This project is community-made and unofficial, and may break if the backend API changes.
All versions of pepito-client with dependencies
ext-json Version *
ext-curl Version *
ext-phar Version *
ext-zlib Version *
composer-plugin-api Version ^2.0
composer-runtime-api Version ^2.0
psr/clock Version ^1.0
psr/simple-cache Version ^1.0 || ^2.0 || ^3.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/event-dispatcher Version ^1.0
psr/log Version ^1.1 || ^2.0 || ^3.0