PackageTrack
Sign in Get early access

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
Release Pre-release

Releases

latest 7
  1. 2.0.2 03 Sep 2023
    Release notes

    What's Changed

    • Added .gitattributes to reduce vendor size by @vtsykun in #11

    Full Changelog: 2.0.1...2.0.2

    Open source →
  2. 2.0.1 20 Jul 2022
    Release notes
    • Fixed PHPStan type annotations
    Open source →
    Release notes
    • Fixed PHPStan type annotations
    Open source →
  3. 2.0.0 20 Jul 2022
    Release notes
    • 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 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.
    • 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

    Open source →
    Release notes
    • 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 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.
      • Added support for nesting handlers and made sure new instances' registration/unregistration does not cause issues with previous instances. See README for more details.
    Open source →
  4. 1.3.0 17 Feb 2022
    Release notes
    • Dropped support for PHP <7.1 which allows dropping ticks for performance reasons (#6, #7)
      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+ (#7)
    Open source →
    Release notes
    • 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+
    Open source →
  5. 1.2.0 29 Jul 2019
    Release notes
    • Added support for unregistering signal handlers
    Open source →
    Release notes
    • Added support for unregistering signal handlers
    Open source →
  6. 1.1.0 14 Sep 2016
    Release notes
    • Added PHP7.1 support for async signal handling
    Open source →
    Release notes
    • Added PHP7.1 support for async signal handling
    Open source →
  7. 1.0.0 15 Sep 2015
    Release notes
    • Initial release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive