Skip to content

Commit 703d614

Browse files
committed
Made code compatible for Symfony 2.3
1 parent f800fb6 commit 703d614

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Cmf/Component/Testing/Phpunit/DatabaseTestListener.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use Symfony\Component\Process\ProcessBuilder;
1616
use Symfony\Component\Process\Process;
17+
use Symfony\Component\Process\ProcessUtils;
1718
use Symfony\Component\Process\PhpExecutableFinder;
1819
use Symfony\Component\HttpKernel\Kernel;
1920
use Doctrine\Common\DataFixtures\Purger;
@@ -30,7 +31,10 @@ public function __construct($processBuilder = null)
3031
$phpExecutableFinder = new PhpExecutableFinder();
3132
$phpExecutable = $phpExecutableFinder->find();
3233
if (false !== $phpExecutable) {
33-
$this->processBuilder->setPrefix(array($phpExecutable, __DIR__.'/../../../../../../bin/console'));
34+
$this->processBuilder->setPrefix(
35+
ProcessUtils::escapeArgument($phpExecutable).' '.
36+
ProcessUtils::escapeArgument(__DIR__.'/../../../../../../bin/console')
37+
);
3438
} else {
3539
throw new \RuntimeException('No PHP executable found on the current system.');
3640
}

0 commit comments

Comments
 (0)