Skip to content

Installation

tilttek/spotlight
composer 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\TableStore that keeps the tables in its database;
  • a PSR-20 ClockInterface, such as the NativeClock of symfony/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.