Pulse isn’t in the stores yet. This documentation describes the app as it will ship. Notify me at launch ›
PHP
pulse-si/php is the shared core of the Laravel and Symfony packages, with the worker and the shared folder. For PHP without a framework, use the heartbeat.
PHP 8.1 or later, with Laravel or Symfony.
What pulse-si/php is#
pulse-si/php is installed with pulse-si/laravel or pulse-si/symfony. It’s the part that talks to the API. You don’t need to install it yourself.
PHP without Laravel or Symfony#
pulse-si/php has no command or entry point of its own, and for PHP the API only accepts the package names pulse-laravel and pulse-symfony. For another PHP app, use an address or the heartbeat: create the app with A heartbeat, then call this address from a cron.
curl -fsS -X POST https://api.pulse-app.si/ingest/heartbeat -H "Authorization: Bearer pk_live_…"How it works#
A PHP request is too short to carry a report, so the work is split between a long-running worker and your other processes, which communicate through a local folder.
| Process | What it does |
|---|---|
The worker (pulse-app:work, pulse:work) | Runs the checks, sends reports and logs, follows the API’s pace. |
| The scheduler, the queue, web requests | Write job runs and logs to the local folder. They never talk to Pulse. |
The local folder (storage/pulse/, var/pulse/) | Holds job runs, logs (1000 lines and 1 MB at most) and the API’s last response. |
All these processes must see the same folder and the same PULSE_KEY. If the worker stops, the shared state expires and log copying turns off, without blocking anything.
PHP extensions#
Only json is required. The others enable a feature or make one safer.
| Extension | Used for | Without it |
|---|---|---|
json | The report format | The package won’t install. |
curl | Sending reports | Falls back to PHP streams. |
sodium, openssl | Secure mode | The worker refuses to start if PULSE_PUBLIC_KEY is set, so nothing is sent in the clear. |
openssl | Pinning a relay (PULSE_RELAY_FINGERPRINT) | The worker refuses to start if the fingerprint is set. |
pcntl | Clean worker shutdown, strict probe timeouts | The worker stops on the signal without finishing its send. A slow probe is marked as failed afterward. |
Log copying goes through a Monolog handler, which Laravel and Symfony provide.
What can go wrong#
The package never interrupts your app. If Pulse can’t be reached, you get a single warning and the worker keeps retrying. If the key is refused, the worker stops. Restart it with the new key. If the worker isn’t running, Pulse stops receiving anything and alerts you as it would for any silent app.
- Laravel
Install, start the worker, configure.
- Symfony
Add the bundle, start the worker, configure.
- Heartbeat signal
For a script or a scheduled job.
Still missing an answer? Contact support