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

Laravel Signal Aware Command Laravel Package

spatie/laravel-signal-aware-command

Add signal awareness to Laravel Artisan commands. Gracefully handle SIGINT/SIGTERM (Ctrl+C, container stop, deploy) to stop work cleanly, run shutdown logic, and avoid half-finished jobs—ideal for long-running CLI tasks and workers.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Seamlessly integrates with Laravel's Artisan command architecture by extending the base Command class, leveraging Symfony's console component. No architectural conflicts; designed specifically for Laravel's ecosystem.
Integration feasibility: High for Unix-based environments (Linux/macOS) with pcntl extension enabled. Windows support is impossible due to pcntl limitations. Requires verification of PHP environment compatibility.
Technical risk: Dependency on pcntl (not available on Windows or some shared hosting), potential Laravel version incompatibility, and undefined behavior if signals are overridden by other handlers. Risk of silent failures if pcntl is missing.
Key questions: What is the minimum Laravel version supported? Are there known issues with specific PHP versions? How does the package handle pcntl unavailability (e.g., graceful fallback or error)? Does it support custom signal handlers alongside other packages?

Integration Approach

Stack fit: Ideal for Laravel projects using Artisan commands. No additional stack components required; works natively within Laravel's CLI framework.
Migration path: Replace Illuminate\Console\Command with Spatie\SignalAwareCommand\SignalAwareCommand in existing commands. Implement handleSignal() method for shutdown logic. Minimal code changes required for each command.
Compatibility: Requires PHP with pcntl enabled (Linux/macOS only). Compatible with Laravel 8+ (verify via package composer.json). Not compatible with Windows or environments without pcntl.
Sequencing: 1) Confirm pcntl is installed and enabled in target environments. 2)

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