From 1b81b540252c3cff9a5a995636580a2e3c103ab1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 11 May 2022 10:16:26 +0200 Subject: [PATCH] Fix type issue in require command abort --- src/Composer/Command/RequireCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index 373d0451a..230e449c6 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/src/Composer/Command/RequireCommand.php @@ -117,9 +117,9 @@ EOT { if (function_exists('pcntl_async_signals') && function_exists('pcntl_signal')) { pcntl_async_signals(true); - pcntl_signal(SIGINT, array($this, 'revertComposerFile')); - pcntl_signal(SIGTERM, array($this, 'revertComposerFile')); - pcntl_signal(SIGHUP, array($this, 'revertComposerFile')); + pcntl_signal(SIGINT, function () { $this->revertComposerFile(); }); + pcntl_signal(SIGTERM, function () { $this->revertComposerFile(); }); + pcntl_signal(SIGHUP, function () { $this->revertComposerFile(); }); } $this->file = Factory::getComposerFile();