Skip to content

Releases: Seldaek/signal-handler

2.0.2

03 Sep 09:24
04a6112
Compare
Choose a tag to compare

What's Changed

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

Full Changelog: 2.0.1...2.0.2

2.0.1

20 Jul 18:32
f69d119
Compare
Choose a tag to compare
  • Fixed PHPStan type annotations

2.0.0

20 Jul 14:28
e1ac658
Compare
Choose a tag to compare
  • 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

1.3.0

17 Feb 20:39
7904836
Compare
Choose a tag to compare
  • 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)

1.2.0

29 Jul 10:27
0852a32
Compare
Choose a tag to compare
  • Added support for unregistering signal handlers

1.1.0

14 Sep 09:43
Compare
Choose a tag to compare
  • Added PHP7.1 support for async signal handling