Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Signal Handler Laravel Package

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.

View on GitHub
Deep Wiki
Context7
2.0.2

What's Changed

Full Changelog: https://github.com/Seldaek/signal-handler/compare/2.0.1...2.0.2

2.0.1
  • Fixed PHPStan type annotations
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 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: https://github.com/Seldaek/signal-handler/compare/1.3.0...2.0.0

1.3.0
  • 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
  • Added support for unregistering signal handlers
1.1.0
  • Added PHP7.1 support for async signal handling
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport