From 21ab2f85bba2343041d5afdc2c95eff5dc376296 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 7 Feb 2020 23:21:48 +0100 Subject: [PATCH] Fix 7.4 build --- tests/Composer/Test/Command/RunScriptCommandTest.php | 3 ++- .../Test/Package/Archiver/ArchivableFilesFinderTest.php | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/Composer/Test/Command/RunScriptCommandTest.php b/tests/Composer/Test/Command/RunScriptCommandTest.php index 97acc6d26..6a2adbd2d 100644 --- a/tests/Composer/Test/Command/RunScriptCommandTest.php +++ b/tests/Composer/Test/Command/RunScriptCommandTest.php @@ -66,7 +66,8 @@ class RunScriptCommandTest extends TestCase $ed->expects($this->once()) ->method('dispatchScript') - ->with($scriptName, $expectedDevMode, array()); + ->with($scriptName, $expectedDevMode, array()) + ->willReturn(0); $composer = $this->createComposerInstance(); $composer->setEventDispatcher($ed); diff --git a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php index cea4088b1..b8f110937 100644 --- a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php +++ b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php @@ -309,7 +309,11 @@ class ArchivableFilesFinderTest extends TestCase protected function getArchivedFiles($command) { - $process = new Process($command, $this->sources); + if (method_exists('Symfony\Component\Process\Process', 'fromShellCommandline')) { + $process = Process::fromShellCommandline($command, $this->sources); + } else { + $process = new Process($command, $this->sources); + } $process->run(); $archive = new \PharData($this->sources.'/archive.zip');