Installation
tilttek/spotlightcomposer require tilttek/spotlight
The package needs PHP 8.5 or later and psr/clock, whose clock gives the service the time.
An application gives Spotlight:
- a
Contract\TableStorethat keeps the tables in its database; - a PSR-20
ClockInterface, such as theNativeClockofsymfony/clock; - a
Contract\SpotlightObserver, to send its messages, or nothing.
The service keeps no state between calls, so one instance serves every request of a long-running worker.
Store\InMemoryTableStore keeps the tables in memory, for tests.