seld/signal-handler
Lightweight PHP signal handling for CLI apps. Provides a simple API to register handlers for POSIX signals, integrate with event loops, and reliably dispatch callbacks. Ideal for daemons, workers, and long-running processes that need clean shutdowns.
Full Changelog: https://github.com/Seldaek/signal-handler/compare/2.0.1...2.0.2
SignalHandler::create() MUST now be stored in a variable even if you handle signals via the callback, as otherwise the weak reference will be garbage collected immediately and the handler will never be called. See README for more details.
SignalHandler class is now finalSignalHandler constructor is now private as it should anyway only be created via ::create()unregister() now clears a handler instance fully and you do not need to pass which signals you want to clear anymore.exitWithLastSignal method on signal handler which you should use if you want to exit() the process when a signal was received/handled. This hints to the parent process which signaled that the process was terminated due to the signal.Full Changelog: https://github.com/Seldaek/signal-handler/compare/1.3.0...2.0.0
declare(ticks = 1); previously you should now be able to remove it from your code.
How can I help you explore Laravel packages today?