Repository navigation
Releases
Releases · thesis-php/hot-reload
0.4.0 onReload(), --forward-signal, TransparentProcess, bugfixes
Added
--forward-signalCLI option — forward signals to the process (e.g.SIGUSR1or10)TransparentProcess::start()— runs a command inheriting stdin/stdout/stderr and forwarding signals- BC break:
$onReloadparameter inhotReload()— optional callback invoked before each reload
Fixed
hotReload()now correctly terminates the running task when files change; previously the task could outlive the restarthotReload()no longer outputs anything; use$onReloadto handle reload notifications
Changed
- BC break:
$processparameter ofhotReload()renamed to$task - BC break:
bin/hot-reloadno longer forwards any signals by default; use--forward-signalto opt in - BC break: Default
--term-timeoutchanged from10sto3s - Require
thesis/exceptionally^0.3 - Require
symfony/console^7.0 || ^8.0
0.3.1 Non-blocking `proc_close()`, immediate cancellation, --term-timeout
Added
--term-timeoutCLI option (default:10s) — time to wait for the process to exit afterSIGTERMbefore sendingSIGKILL
Fixed
proc_close()no longer blocks when the process is slow to respond toSIGTERM; it is now called only afterSIGCHLDconfirms the process has exitedSIGKILLis sent automatically after$terminationTimeoutseconds if the process does not exit onSIGTERM
0.3.0 hotReload() function, use cancellation for interruption, Target -> Files, internalize debounce()and TtyProcess
Added
hotReload<T>(callable(Cancellation): T): Tfunction as the new top-level PHP API
Changed
- BC break:
Targetrenamed toFiles - BC break:
ChangeDetector\MtimePollingrenamed toChangeDetector\FileMtimePoller - BC break:
ChangeDetector::onChanged(Target $target)parameter changed toFiles $files
Removed
- BC break:
debouncefunction (now internal) - BC break:
Watcherclass; usehotReload()instead - BC break:
Processinterface - BC break:
Process\Ttyclass (replaced by internalTtyProcess) - BC break:
ChangeDetector\Finderclass (logic merged intoFiles)
0.2.0 Abstract Process, subscriber ChangeDetector, debounce, rename CLI options
Added
Processinterface withterminate()andawait()methodsdebounce(callable, float): callablehelper function--debounceCLI option (default:0.1s)
Changed
- BC break:
ProcessWithTTYmoved toProcess\Tty, now implements theProcessinterface - BC break:
ChangeDetectorcontract changed from a pull-basedcreateDetector()to a subscriber model:onChanged(Target, callable): stringandcancel(string): void - BC break:
ChangeDetector\FileMtimerenamed toChangeDetector\MtimePolling - BC break:
Watcher::watch()parameters changed:($command, $target)to($target, $start, $debounce, $cancellation) - BC break:
--extensionCLI option renamed to--ext
0.1.2 Fix bin/hot-reload, second attempt
Include /bin/hot-reload in archive
0.1.1 Fix bin/hot-reload
Include /bin/hot-reload in archive
0.1.0 Initial release
vendor/bin/hot-reload [options] [--] <cmd>