CS fixes
parent
67a1924173
commit
966a982738
|
@ -388,7 +388,7 @@ EOF;
|
||||||
'psr-4' => $psr4,
|
'psr-4' => $psr4,
|
||||||
'classmap' => $classmap,
|
'classmap' => $classmap,
|
||||||
'files' => $files,
|
'files' => $files,
|
||||||
'exclude-from-classmap' => $exclude
|
'exclude-from-classmap' => $exclude,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -668,7 +668,6 @@ function composerRequire$suffix(\$fileIdentifier, \$file)
|
||||||
}
|
}
|
||||||
|
|
||||||
FOOTER;
|
FOOTER;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $file . <<<FOOTER
|
return $file . <<<FOOTER
|
||||||
|
|
|
@ -309,7 +309,7 @@ EOT
|
||||||
),
|
),
|
||||||
'bin-compat' => array(
|
'bin-compat' => array(
|
||||||
function ($val) { return in_array($val, array('auto', 'full')); },
|
function ($val) { return in_array($val, array('auto', 'full')); },
|
||||||
function ($val) { return $val; }
|
function ($val) { return $val; },
|
||||||
),
|
),
|
||||||
'discard-changes' => array(
|
'discard-changes' => array(
|
||||||
function ($val) { return in_array($val, array('stash', 'true', 'false', '1', '0'), true); },
|
function ($val) { return in_array($val, array('stash', 'true', 'false', '1', '0'), true); },
|
||||||
|
|
|
@ -32,12 +32,12 @@ class XzDownloader extends ArchiveDownloader
|
||||||
public function __construct(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, Cache $cache = null, ProcessExecutor $process = null)
|
public function __construct(IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null, Cache $cache = null, ProcessExecutor $process = null)
|
||||||
{
|
{
|
||||||
$this->process = $process ?: new ProcessExecutor($io);
|
$this->process = $process ?: new ProcessExecutor($io);
|
||||||
|
|
||||||
parent::__construct($io, $config, $eventDispatcher, $cache);
|
parent::__construct($io, $config, $eventDispatcher, $cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function extract($file, $path)
|
protected function extract($file, $path)
|
||||||
{
|
{
|
||||||
|
|
||||||
$command = 'tar -xJf ' . ProcessExecutor::escape($file) . ' -C ' . ProcessExecutor::escape($path);
|
$command = 'tar -xJf ' . ProcessExecutor::escape($file) . ' -C ' . ProcessExecutor::escape($path);
|
||||||
|
|
||||||
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
if (0 === $this->process->execute($command, $ignoredOutput)) {
|
||||||
|
@ -45,8 +45,8 @@ class XzDownloader extends ArchiveDownloader
|
||||||
}
|
}
|
||||||
|
|
||||||
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
$processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
|
||||||
throw new \RuntimeException($processError);
|
|
||||||
|
|
||||||
|
throw new \RuntimeException($processError);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,6 @@ use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Util\ProcessExecutor;
|
use Composer\Util\ProcessExecutor;
|
||||||
use Composer\Util\Symlink;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Package installation manager.
|
* Package installation manager.
|
||||||
|
|
|
@ -57,6 +57,7 @@ class VersionSelector
|
||||||
$phpConstraint = new Constraint('==', $this->getParser()->normalize($targetPhpVersion));
|
$phpConstraint = new Constraint('==', $this->getParser()->normalize($targetPhpVersion));
|
||||||
$candidates = array_filter($candidates, function ($pkg) use ($phpConstraint) {
|
$candidates = array_filter($candidates, function ($pkg) use ($phpConstraint) {
|
||||||
$reqs = $pkg->getRequires();
|
$reqs = $pkg->getRequires();
|
||||||
|
|
||||||
return !isset($reqs['php']) || $reqs['php']->getConstraint()->matches($phpConstraint);
|
return !isset($reqs['php']) || $reqs['php']->getConstraint()->matches($phpConstraint);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ use Prophecy\Argument;
|
||||||
|
|
||||||
class RootAliasPackageTest extends TestCase
|
class RootAliasPackageTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testUpdateRequires()
|
public function testUpdateRequires()
|
||||||
{
|
{
|
||||||
$root = $this->getMockRootPackageInterface();
|
$root = $this->getMockRootPackageInterface();
|
||||||
|
@ -89,6 +88,7 @@ class RootAliasPackageTest extends TestCase
|
||||||
$root->getConflicts()->willReturn(array())->shouldBeCalled();
|
$root->getConflicts()->willReturn(array())->shouldBeCalled();
|
||||||
$root->getProvides()->willReturn(array())->shouldBeCalled();
|
$root->getProvides()->willReturn(array())->shouldBeCalled();
|
||||||
$root->getReplaces()->willReturn(array())->shouldBeCalled();
|
$root->getReplaces()->willReturn(array())->shouldBeCalled();
|
||||||
|
|
||||||
return $root;
|
return $root;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,6 +213,7 @@ class VersionSelectorTest extends \PHPUnit_Framework_TestCase
|
||||||
private function createPackage($version)
|
private function createPackage($version)
|
||||||
{
|
{
|
||||||
$parser = new VersionParser();
|
$parser = new VersionParser();
|
||||||
|
|
||||||
return new Package('foo', $parser->normalize($version), $version);
|
return new Package('foo', $parser->normalize($version), $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue