commit
943c7a6433
|
@ -50,7 +50,6 @@ EOT
|
||||||
$requires = array();
|
$requires = array();
|
||||||
if ($input->getOption('no-dev')) {
|
if ($input->getOption('no-dev')) {
|
||||||
$installedRepo = $composer->getLocker()->getLockedRepository(!$input->getOption('no-dev'));
|
$installedRepo = $composer->getLocker()->getLockedRepository(!$input->getOption('no-dev'));
|
||||||
$dependencies = $installedRepo->getPackages();
|
|
||||||
} else {
|
} else {
|
||||||
$installedRepo = $composer->getRepositoryManager()->getLocalRepository();
|
$installedRepo = $composer->getRepositoryManager()->getLocalRepository();
|
||||||
// fallback to lockfile if installed repo is empty
|
// fallback to lockfile if installed repo is empty
|
||||||
|
|
|
@ -291,7 +291,7 @@ EOT
|
||||||
$value = $data;
|
$value = $data;
|
||||||
} elseif (isset($data['config'][$settingKey])) {
|
} elseif (isset($data['config'][$settingKey])) {
|
||||||
$value = $this->config->get($settingKey, $input->getOption('absolute') ? 0 : Config::RELATIVE_PATHS);
|
$value = $this->config->get($settingKey, $input->getOption('absolute') ? 0 : Config::RELATIVE_PATHS);
|
||||||
} elseif (in_array($settingKey, $properties, true) && isset($rawData[$settingKey])) {
|
} elseif (isset($rawData[$settingKey]) && in_array($settingKey, $properties, true)) {
|
||||||
$value = $rawData[$settingKey];
|
$value = $rawData[$settingKey];
|
||||||
} else {
|
} else {
|
||||||
throw new \RuntimeException($settingKey.' is not defined');
|
throw new \RuntimeException($settingKey.' is not defined');
|
||||||
|
|
|
@ -423,7 +423,9 @@ EOT
|
||||||
$packageIsIgnored = \in_array($package->getPrettyName(), $ignoredPackages, true);
|
$packageIsIgnored = \in_array($package->getPrettyName(), $ignoredPackages, true);
|
||||||
if ($input->getOption('outdated') && ($packageIsUpToDate || $packageIsIgnored)) {
|
if ($input->getOption('outdated') && ($packageIsUpToDate || $packageIsIgnored)) {
|
||||||
continue;
|
continue;
|
||||||
} elseif ($input->getOption('outdated') || $input->getOption('strict')) {
|
}
|
||||||
|
|
||||||
|
if ($input->getOption('outdated') || $input->getOption('strict')) {
|
||||||
$hasOutdatedPackages = true;
|
$hasOutdatedPackages = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,11 +681,7 @@ EOT
|
||||||
foreach ($package->getAutoload() as $type => $autoloads) {
|
foreach ($package->getAutoload() as $type => $autoloads) {
|
||||||
$io->write('<comment>' . $type . '</comment>');
|
$io->write('<comment>' . $type . '</comment>');
|
||||||
|
|
||||||
if ($type === 'psr-0') {
|
if ($type === 'psr-0' || $type === 'psr-4') {
|
||||||
foreach ($autoloads as $name => $path) {
|
|
||||||
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
|
||||||
}
|
|
||||||
} elseif ($type === 'psr-4') {
|
|
||||||
foreach ($autoloads as $name => $path) {
|
foreach ($autoloads as $name => $path) {
|
||||||
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($downloader instanceof VcsCapableDownloaderInterface) {
|
if ($downloader instanceof VcsCapableDownloaderInterface) {
|
||||||
if ($currentRef = $downloader->getVcsReference($package, $targetDir)) {
|
if ($downloader->getVcsReference($package, $targetDir)) {
|
||||||
switch ($package->getInstallationSource()) {
|
switch ($package->getInstallationSource()) {
|
||||||
case 'source':
|
case 'source':
|
||||||
$previousRef = $package->getSourceReference();
|
$previousRef = $package->getSourceReference();
|
||||||
|
|
|
@ -83,7 +83,7 @@ EOT
|
||||||
|
|
||||||
// Determine output mode, default is by-package
|
// Determine output mode, default is by-package
|
||||||
$mode = SuggestedPackagesReporter::MODE_BY_PACKAGE;
|
$mode = SuggestedPackagesReporter::MODE_BY_PACKAGE;
|
||||||
$io = $this->getIO();
|
|
||||||
// if by-suggestion is given we override the default
|
// if by-suggestion is given we override the default
|
||||||
if ($input->getOption('by-suggestion')) {
|
if ($input->getOption('by-suggestion')) {
|
||||||
$mode = SuggestedPackagesReporter::MODE_BY_SUGGESTION;
|
$mode = SuggestedPackagesReporter::MODE_BY_SUGGESTION;
|
||||||
|
|
|
@ -122,9 +122,8 @@ EOT
|
||||||
|
|
||||||
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'validate', $input, $output);
|
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'validate', $input, $output);
|
||||||
$eventCode = $composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
$eventCode = $composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
||||||
$exitCode = max($eventCode, $exitCode);
|
|
||||||
|
|
||||||
return $exitCode;
|
return max($eventCode, $exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function outputResult($io, $name, &$errors, &$warnings, $checkPublish = false, $publishErrors = array(), $checkLock = false, $lockErrors = array(), $printSchemaUrl = false)
|
private function outputResult($io, $name, &$errors, &$warnings, $checkPublish = false, $publishErrors = array(), $checkLock = false, $lockErrors = array(), $printSchemaUrl = false)
|
||||||
|
|
Loading…
Reference in New Issue