Releases: Seldaek/signal-handler
Releases · Seldaek/signal-handler
2.0.2
2.0.1
2.0.0
- BC Break: On PHP 8.0 the result of
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. - BC Break: The
SignalHandler
class is now final - BC Break: The
SignalHandler
constructor is now private as it should anyway only be created via::create()
- BC Break:
unregister()
now clears a handler instance fully and you do not need to pass which signals you want to clear anymore. - Bumped PHP requirement to 7.2
- Added
exitWithLastSignal
method on signal handler which you should use if you want toexit()
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. - Added support for nesting handlers and made sure new instances' registration/unregistration does not cause issues with previous instances. See README for more details.
Full Changelog: 1.3.0...2.0.0