seld/signal-handler
Simple unix signal handler that silently fails where signals are not supported for easy cross-platform development
2.0.2
85M downloads/mo
#351 most downloaded on Packagist
Seldaek/signal-handler
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Ships fairly regularly
a new release about every 1.1 years
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
7 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
7 releases · Sep 2015 to Sep 2023
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Releases
latest 7-
2.0.203 Sep 2023 -
2.0.120 Jul 2022 -
2.0.020 Jul 2022Release notes
Open source →- 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
SignalHandlerclass is now final - BC Break: The
SignalHandlerconstructor 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
exitWithLastSignalmethod 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
Release notes
Open source →- 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
SignalHandlerclass is now final - BC Break: The
SignalHandlerconstructor 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
exitWithLastSignalmethod 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.
- BC Break: The
- BC Break: On PHP 8.0+ the result of
-
1.3.017 Feb 2022Release notes
Open source →- Dropped support for PHP <7.1 which allows dropping ticks for performance reasons (#6)
If you used
declare(ticks = 1);previously you should now be able to remove it from your code.- Added support for CTRL+C / CTRL+BREAK (both handled as SIGINT) on Windows on PHP 7.4+
- Dropped support for PHP <7.1 which allows dropping ticks for performance reasons (#6)
If you used
-
1.2.029 Jul 2019 -
1.1.014 Sep 2016 -
1.0.015 Sep 2015