Fix CS
parent
10e634890e
commit
4c9e75c6e5
|
@ -133,7 +133,7 @@ EOT
|
||||||
$options['autoload'] = (object) array(
|
$options['autoload'] = (object) array(
|
||||||
'psr-4' => array(
|
'psr-4' => array(
|
||||||
$namespace . '\\' => $autoloadPath,
|
$namespace . '\\' => $autoloadPath,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +444,6 @@ EOT
|
||||||
$autoload
|
$autoload
|
||||||
);
|
);
|
||||||
$input->setOption('autoload', $autoload);
|
$input->setOption('autoload', $autoload);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -673,9 +672,10 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
$namespace = array_map(
|
$namespace = array_map(
|
||||||
function($part) {
|
function ($part) {
|
||||||
$part = preg_replace('/[^a-z0-9]/i', ' ', $part);
|
$part = preg_replace('/[^a-z0-9]/i', ' ', $part);
|
||||||
$part = ucwords($part);
|
$part = ucwords($part);
|
||||||
|
|
||||||
return str_replace(' ', '', $part);
|
return str_replace(' ', '', $part);
|
||||||
},
|
},
|
||||||
explode('/', $packageName)
|
explode('/', $packageName)
|
||||||
|
|
|
@ -91,6 +91,7 @@ EOT
|
||||||
|
|
||||||
if (!$packagesToReinstall) {
|
if (!$packagesToReinstall) {
|
||||||
$io->writeError('<warning>Found no packages to reinstall, aborting.</warning>');
|
$io->writeError('<warning>Found no packages to reinstall, aborting.</warning>');
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,11 @@ use Composer\Repository\RootPackageRepository;
|
||||||
use Composer\Semver\Constraint\ConstraintInterface;
|
use Composer\Semver\Constraint\ConstraintInterface;
|
||||||
use Composer\Semver\Semver;
|
use Composer\Semver\Semver;
|
||||||
use Composer\Spdx\SpdxLicenses;
|
use Composer\Spdx\SpdxLicenses;
|
||||||
use Composer\Util\Platform;
|
|
||||||
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Terminal;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Robert Schönthal <seroscho@googlemail.com>
|
* @author Robert Schönthal <seroscho@googlemail.com>
|
||||||
|
|
|
@ -441,7 +441,7 @@ class Problem
|
||||||
if ($topPackage instanceof RootPackageInterface) {
|
if ($topPackage instanceof RootPackageInterface) {
|
||||||
return array(
|
return array(
|
||||||
"- Root composer.json requires $packageName".self::constraintToText($constraint).', it is ',
|
"- Root composer.json requires $packageName".self::constraintToText($constraint).', it is ',
|
||||||
'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.$topPackage->getPrettyName().' is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.'
|
'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.$topPackage->getPrettyName().' is the root package and cannot be modified. See https://getcomposer.org/dep-on-root for details and assistance.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ class Problem
|
||||||
$singular = count($higherRepoPackages) === 1;
|
$singular = count($higherRepoPackages) === 1;
|
||||||
|
|
||||||
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ',
|
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ',
|
||||||
'found '.self::getPackageList($nextRepoPackages, $isVerbose).' in the lock file and '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' but ' . ($singular ? 'it does' : 'these do') . ' not match your '.$reason.' and ' . ($singular ? 'is' : 'are') . ' therefore not installable. Make sure you either fix the '.$reason.' or avoid updating this package to keep the one from the lock file.');
|
'found '.self::getPackageList($nextRepoPackages, $isVerbose).' in the lock file and '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' but ' . ($singular ? 'it does' : 'these do') . ' not match your '.$reason.' and ' . ($singular ? 'is' : 'are') . ' therefore not installable. Make sure you either fix the '.$reason.' or avoid updating this package to keep the one from the lock file.', );
|
||||||
}
|
}
|
||||||
|
|
||||||
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ', 'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' has higher repository priority. The packages with higher priority do not match your '.$reason.' and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.');
|
return array("- Root composer.json requires $packageName".self::constraintToText($constraint) . ', it is ', 'satisfiable by '.self::getPackageList($nextRepoPackages, $isVerbose).' from '.$nextRepo->getRepoName().' but '.self::getPackageList($higherRepoPackages, $isVerbose).' from '.reset($higherRepoPackages)->getRepository()->getRepoName().' has higher repository priority. The packages with higher priority do not match your '.$reason.' and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.');
|
||||||
|
|
|
@ -243,7 +243,6 @@ abstract class Rule
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $package2->getPrettyString().' conflicts with '.$conflictTarget.'.';
|
return $package2->getPrettyString().' conflicts with '.$conflictTarget.'.';
|
||||||
|
|
||||||
case self::RULE_PACKAGE_REQUIRES:
|
case self::RULE_PACKAGE_REQUIRES:
|
||||||
|
|
|
@ -16,7 +16,6 @@ use Composer\IO\IOInterface;
|
||||||
use Composer\IO\ConsoleIO;
|
use Composer\IO\ConsoleIO;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Repository\RepositoryInterface;
|
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\DependencyResolver\Operation\OperationInterface;
|
use Composer\DependencyResolver\Operation\OperationInterface;
|
||||||
use Composer\DependencyResolver\Operation\InstallOperation;
|
use Composer\DependencyResolver\Operation\InstallOperation;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Package\Archiver;
|
namespace Composer\Package\Archiver;
|
||||||
|
|
||||||
use Composer\Downloader\DownloadManager;
|
use Composer\Downloader\DownloadManager;
|
||||||
use Composer\Package\PackageInterface;
|
|
||||||
use Composer\Package\RootPackageInterface;
|
use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Util\Loop;
|
use Composer\Util\Loop;
|
||||||
|
|
|
@ -205,6 +205,4 @@ interface CompletePackageInterface extends PackageInterface
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setArchiveExcludes(array $excludes);
|
public function setArchiveExcludes(array $excludes);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,9 @@
|
||||||
namespace Composer\Package\Loader;
|
namespace Composer\Package\Loader;
|
||||||
|
|
||||||
use Composer\Package\BasePackage;
|
use Composer\Package\BasePackage;
|
||||||
use Composer\Package\AliasPackage;
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\Package\Package;
|
use Composer\Package\Package;
|
||||||
use Composer\Package\RootPackageInterface;
|
|
||||||
use Composer\Package\RootAliasPackage;
|
use Composer\Package\RootAliasPackage;
|
||||||
use Composer\Repository\RepositoryFactory;
|
use Composer\Repository\RepositoryFactory;
|
||||||
use Composer\Package\Version\VersionGuesser;
|
use Composer\Package\Version\VersionGuesser;
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace Composer\Repository;
|
||||||
|
|
||||||
use Composer\Json\JsonFile;
|
use Composer\Json\JsonFile;
|
||||||
use Composer\Package\Loader\ArrayLoader;
|
use Composer\Package\Loader\ArrayLoader;
|
||||||
use Composer\Package\PackageInterface;
|
|
||||||
use Composer\Package\RootPackageInterface;
|
use Composer\Package\RootPackageInterface;
|
||||||
use Composer\Package\AliasPackage;
|
use Composer\Package\AliasPackage;
|
||||||
use Composer\Package\Dumper\ArrayDumper;
|
use Composer\Package\Dumper\ArrayDumper;
|
||||||
|
|
|
@ -228,6 +228,7 @@ class GitLabDriver extends VcsDriver
|
||||||
if ($this->protocol) {
|
if ($this->protocol) {
|
||||||
return $this->project["{$this->protocol}_url_to_repo"];
|
return $this->project["{$this->protocol}_url_to_repo"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->isPrivate ? $this->project['ssh_url_to_repo'] : $this->project['http_url_to_repo'];
|
return $this->isPrivate ? $this->project['ssh_url_to_repo'] : $this->project['http_url_to_repo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
namespace Composer\Util;
|
namespace Composer\Util;
|
||||||
|
|
||||||
use Composer\Package\Link;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
|
|
||||||
class PackageSorter
|
class PackageSorter
|
||||||
|
|
|
@ -42,7 +42,6 @@ class Platform
|
||||||
* putenv('X') equivalent but updates the runtime global variables too
|
* putenv('X') equivalent but updates the runtime global variables too
|
||||||
*
|
*
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $value
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function clearEnv($name)
|
public static function clearEnv($name)
|
||||||
|
|
|
@ -260,9 +260,11 @@ class ProcessExecutor
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,9 +274,11 @@ class ProcessExecutor
|
||||||
$process->start();
|
$process->start();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
call_user_func($job['reject'], $e);
|
call_user_func($job['reject'], $e);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,5 +113,4 @@ class InitCommandTest extends TestCase
|
||||||
$namespace = $command->namespaceFromPackageName(null);
|
$namespace = $command->namespaceFromPackageName(null);
|
||||||
$this->assertNull($namespace);
|
$this->assertNull($namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,6 @@ class ZipDownloaderTest extends TestCase
|
||||||
|
|
||||||
$downloader = new ZipDownloader($this->io, $this->config, $this->httpDownloader);
|
$downloader = new ZipDownloader($this->io, $this->config, $this->httpDownloader);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$loop = new Loop($this->httpDownloader);
|
$loop = new Loop($this->httpDownloader);
|
||||||
$promise = $downloader->download($this->package, $path = sys_get_temp_dir().'/composer-zip-test');
|
$promise = $downloader->download($this->package, $path = sys_get_temp_dir().'/composer-zip-test');
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Test\Mock;
|
namespace Composer\Test\Mock;
|
||||||
|
|
||||||
use Composer\Installer\InstallationManager;
|
use Composer\Installer\InstallationManager;
|
||||||
use Composer\Repository\RepositoryInterface;
|
|
||||||
use Composer\Repository\InstalledRepositoryInterface;
|
use Composer\Repository\InstalledRepositoryInterface;
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
|
|
Loading…
Reference in New Issue