Fledge Pulse is based on Laravel Pulse v1.8.1. Besides composer.json, exactly two upstream runtime files are edited: src/Support/PulseMigration.php and src/Recorders/Concerns/Sampling.php. Everything else is an overlay under src/Fiber/.
Storage driver registry
Upstream always binds DatabaseStorage, whatever pulse.storage.driver says. Here StorageManager resolves the driver and the default is database (FiberDatabaseStorage). Packages and applications register drivers with extend; see Examples.
FiberDatabaseStorage is fiber-safe on every supported connection:
- Shared PDO (plain
mariadb,mysql,pgsql,sqlite,fledge-mariadb, ...): one PDO serves every fiber. Each storage operation (storewith its transaction,trim,purgeand every read, including fully reading the result set) runs under a per-connectionLocalMutex, so parallel cards take turns instead of failing with "stream is in use by another fiber", unbuffered-query errors or "already an active transaction". Correct, but sequential.
Warning: The lock is reentrant within one fiber. Do not start a child fiber with
async()and await it from inside a storage call on the same shared connection: the child would wait for the lock its parent holds.
Fiber guarantees
- Dialect by connection class.
FiberDatabaseStoragepicks its upsert SQL from the connection class (MySQL family, Postgres, SQLite), not fromgetDriverName(). - Fiber-scoped
ignore().Pulse::ignore()keeps a depth per fiber instead of saving and restoring one shared flag, so overlapping cards can no longer leave recording switched off. The depth is not inherited by child fibers started withFledge\Async\async()inside the callback; wrap those closures inignore()too if they must not record. - Ingest swaps buffers before I/O.
ingest()takes the entries and lazy resolvers out of the live buffers before it suspends, so anything recorded meanwhile is ingested next time instead of being flushed away. - One buffer-size ingest at a time. When the buffer grows past
pulse.ingest.buffer, one fiber ingests. Fibers that record while that ingest is in flight return immediately; their entries go into the next ingest. - Fledge Redis ingest. With
REDIS_CLIENT=fledge, the Redis ingest runs throughFledgeRedisConnection. Upstream'sRedisAdapteris typed for PhpRedis, Predis and Relay, so on a Fledge connection it throws and Pulse's error handling swallows it: nothing gets recorded. - No blocking sleeps.
pulse:workandpulse:checkwait throughLaravel\Pulse\Fiber\Support\FiberSleep, aSleepsubclass that waits withFledge\Async\delay(), so they yield to other fibers.Sleep::fake()still works in tests. Digest and trim stay sequential. rememberMany. Cards can useLaravel\Pulse\Fiber\Livewire\Concerns\RemembersConcurrentlyto remember several queries at once. Cache hits are returned as is; only the misses run, concurrently, throughFiberDB::concurrent. It shares cache keys and TTL withremember(). On a shared PDO the storage lock serializes the queries, so it is safe but no faster than callingremember()in a row.
Redis pipeline
Since v1.8.1.3, FledgeRedisAdapter::pipeline() runs on a bounded pool of fibers: at most 256 worker fibers (a fixed bound, not configurable) drain the queue and enqueue commands on the link in queue order, so stream entries keep their insertion order. Every queued command still runs when an earlier one fails; the error of the first failing command in queue order is thrown afterwards. Up to 256 commands are in flight at once, so a batch of that size or smaller is one round trip and a larger one takes about ceil(N / 256). Stock Pulse has no fiber pipeline.
The upstream files edited
src/Support/PulseMigration.phpdecided whether a migration should run by matchinggetDriverName()againstmariadb,mysql,pgsqlandsqlite, which rejected connections with other driver names. It now checks the connection class instead.src/Recorders/Concerns/Sampling.phpturned the whole 32-digit md5 of the seed into a number withhexdec(). That overflowsPHP_INT_MAX, which PHP 8.6 reports as a notice, so deterministic sampling (the queues and slow jobs recorders) threw under Laravel's error handler. It now scales the first 13 hex digits (52 bits) by 16^13. Over 100,000 random seeds the sampling decision matched the previous implementation at every rate tested (0.001, 0.01, 0.1, 0.5, 0.9).
The test setup is touched too: phpunit.xml.dist gains a Fiber testsuite, tests/Pest.php applies the shared test case to tests/Fiber, and tests/Feature/RedisTest.php no longer runs redis-cli FLUSHALL before every test; each test uses its own random key prefix and deletes only the keys under it.
Release history
| Version | Date | Change |
|---|---|---|
| v1.8.1.4 | 2026-11-23 | Requires PHP 8.6 (breaking); fledge-fiber and fledge-framework ^13.43.0.3; fixes deterministic sampling on PHP 8.6 |
| v1.8.1.3 | 2026-11-18 | Bounded fiber pool in the Fledge Redis pipeline |
| v1.8.1.2 | 2026-10-24 | Requires livewire/livewire ^4.4.8 (GHSA-mhf7-xp6r-6qrc) |
| v1.8.1.1 | 2026-10-22 | Requires fledge-fiber and fledge-framework ^13.38 |
| v1.8.1.0 | 2026-10-14 | First Fledge release, a fork of Laravel Pulse v1.8.1 |