Merge branch '1.6'
commit
ea78712822
|
@ -92,13 +92,14 @@ Add this to your project's root `composer.json`:
|
||||||
That will fetch the `dev-bugfix` version of `monolog/monolog` from your GitHub
|
That will fetch the `dev-bugfix` version of `monolog/monolog` from your GitHub
|
||||||
and alias it to `1.0.x-dev`.
|
and alias it to `1.0.x-dev`.
|
||||||
|
|
||||||
> **Note:** If a package with inline aliases is required, the alias (right of
|
> **Note:** Inline aliasing is a root-only feature. If a package with inline
|
||||||
> the `as`) is used as the version constraint. The part left of the `as` is
|
> aliases is required, the alias (right of the `as`) is used as the version
|
||||||
> discarded. As a consequence, if A requires B and B requires `monolog/monolog`
|
> constraint. The part left of the `as` is discarded. As a consequence, if
|
||||||
> version `dev-bugfix as 1.0.x-dev`, installing A will make B require
|
> A requires B and B requires `monolog/monolog` version `dev-bugfix as 1.0.x-dev`,
|
||||||
> `1.0.x-dev`, which may exist as a branch alias or an actual `1.0` branch. If
|
> installing A will make B require `1.0.x-dev`, which may exist as a branch
|
||||||
> it does not, it must be re-inline-aliased in A's `composer.json`.
|
> alias or an actual `1.0` branch. If it does not, it must be
|
||||||
|
> inline-aliased again in A's `composer.json`.
|
||||||
|
|
||||||
> **Note:** Inline aliasing should be avoided, especially for published
|
> **Note:** Inline aliasing should be avoided, especially for published
|
||||||
> packages. If you found a bug, try and get your fix merged upstream. This
|
> packages/libraries. If you found a bug, try and get your fix merged upstream.
|
||||||
> helps to avoid issues for users of your package.
|
> This helps to avoid issues for users of your package.
|
||||||
|
|
|
@ -329,23 +329,17 @@ EOT
|
||||||
ksort($packages[$type]);
|
ksort($packages[$type]);
|
||||||
|
|
||||||
$nameLength = $versionLength = $latestLength = 0;
|
$nameLength = $versionLength = $latestLength = 0;
|
||||||
foreach ($packages[$type] as $package) {
|
|
||||||
if (is_object($package)) {
|
|
||||||
$nameLength = max($nameLength, strlen($package->getPrettyName()));
|
|
||||||
if ($showVersion) {
|
|
||||||
$versionLength = max($versionLength, strlen($package->getFullPrettyVersion()));
|
|
||||||
if ($showLatest) {
|
|
||||||
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion, $showMinorOnly);
|
|
||||||
if ($latestPackage === false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$latestPackages[$package->getPrettyName()] = $latestPackage;
|
if ($showLatest && $showVersion) {
|
||||||
$latestLength = max($latestLength, strlen($latestPackage->getFullPrettyVersion()));
|
foreach ($packages[$type] as $package) {
|
||||||
|
if (is_object($package)) {
|
||||||
|
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion, $showMinorOnly);
|
||||||
|
if ($latestPackage === false) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$latestPackages[$package->getPrettyName()] = $latestPackage;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$nameLength = max($nameLength, strlen($package));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,11 +351,6 @@ EOT
|
||||||
$hasOutdatedPackages = false;
|
$hasOutdatedPackages = false;
|
||||||
|
|
||||||
$viewData[$type] = array();
|
$viewData[$type] = array();
|
||||||
$viewMetaData[$type] = array(
|
|
||||||
'nameLength' => $nameLength,
|
|
||||||
'versionLength' => $versionLength,
|
|
||||||
'latestLength' => $latestLength,
|
|
||||||
);
|
|
||||||
foreach ($packages[$type] as $package) {
|
foreach ($packages[$type] as $package) {
|
||||||
$packageViewData = array();
|
$packageViewData = array();
|
||||||
if (is_object($package)) {
|
if (is_object($package)) {
|
||||||
|
@ -376,12 +365,15 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
$packageViewData['name'] = $package->getPrettyName();
|
$packageViewData['name'] = $package->getPrettyName();
|
||||||
|
$nameLength = max($nameLength, strlen($package->getPrettyName()));
|
||||||
if ($writeVersion) {
|
if ($writeVersion) {
|
||||||
$packageViewData['version'] = $package->getFullPrettyVersion();
|
$packageViewData['version'] = $package->getFullPrettyVersion();
|
||||||
|
$versionLength = max($versionLength, strlen($package->getFullPrettyVersion()));
|
||||||
}
|
}
|
||||||
if ($writeLatest && $latestPackage) {
|
if ($writeLatest && $latestPackage) {
|
||||||
$packageViewData['latest'] = $latestPackage->getFullPrettyVersion();
|
$packageViewData['latest'] = $latestPackage->getFullPrettyVersion();
|
||||||
$packageViewData['latest-status'] = $this->getUpdateStatus($latestPackage, $package);
|
$packageViewData['latest-status'] = $this->getUpdateStatus($latestPackage, $package);
|
||||||
|
$latestLength = max($latestLength, strlen($latestPackage->getFullPrettyVersion()));
|
||||||
}
|
}
|
||||||
if ($writeDescription) {
|
if ($writeDescription) {
|
||||||
$packageViewData['description'] = $package->getDescription();
|
$packageViewData['description'] = $package->getDescription();
|
||||||
|
@ -403,9 +395,15 @@ EOT
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$packageViewData['name'] = $package;
|
$packageViewData['name'] = $package;
|
||||||
|
$nameLength = max($nameLength, strlen($package));
|
||||||
}
|
}
|
||||||
$viewData[$type][] = $packageViewData;
|
$viewData[$type][] = $packageViewData;
|
||||||
}
|
}
|
||||||
|
$viewMetaData[$type] = array(
|
||||||
|
'nameLength' => $nameLength,
|
||||||
|
'versionLength' => $versionLength,
|
||||||
|
'latestLength' => $latestLength,
|
||||||
|
);
|
||||||
if ($input->getOption('strict') && $hasOutdatedPackages) {
|
if ($input->getOption('strict') && $hasOutdatedPackages) {
|
||||||
$exitCode = 1;
|
$exitCode = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class FossilDownloader extends VcsDownloader
|
||||||
if (0 !== $this->process->execute($command, $ignoredOutput)) {
|
if (0 !== $this->process->execute($command, $ignoredOutput)) {
|
||||||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||||
}
|
}
|
||||||
$command = sprintf('fossil open %s', ProcessExecutor::escape($repoFile));
|
$command = sprintf('fossil open %s --nested', ProcessExecutor::escape($repoFile));
|
||||||
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
|
if (0 !== $this->process->execute($command, $ignoredOutput, realpath($path))) {
|
||||||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,12 @@ class EventDispatcher
|
||||||
|
|
||||||
$return = 0;
|
$return = 0;
|
||||||
foreach ($listeners as $callable) {
|
foreach ($listeners as $callable) {
|
||||||
if (!is_string($callable) && is_callable($callable)) {
|
if (!is_string($callable)) {
|
||||||
|
if (!is_callable($callable)) {
|
||||||
|
$className = is_object($callable[0]) ? get_class($callable[0]) : $callable[0];
|
||||||
|
|
||||||
|
throw new \RuntimeException('Subscriber '.$className.'::'.$callable[1].' for event '.$event->getName().' is not callable, make sure the function is defined and public');
|
||||||
|
}
|
||||||
$event = $this->checkListenerExpectedEvent($callable, $event);
|
$event = $this->checkListenerExpectedEvent($callable, $event);
|
||||||
$return = false === call_user_func($callable, $event) ? 1 : 0;
|
$return = false === call_user_func($callable, $event) ? 1 : 0;
|
||||||
} elseif ($this->isComposerScript($callable)) {
|
} elseif ($this->isComposerScript($callable)) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ class FossilDriver extends VcsDriver
|
||||||
throw new \RuntimeException('Failed to clone '.$this->url.' to repository ' . $this->repoFile . "\n\n" .$output);
|
throw new \RuntimeException('Failed to clone '.$this->url.' to repository ' . $this->repoFile . "\n\n" .$output);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 !== $this->process->execute(sprintf('fossil open %s', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) {
|
if (0 !== $this->process->execute(sprintf('fossil open %s --nested', ProcessExecutor::escape($this->repoFile)), $output, $this->checkoutDir)) {
|
||||||
$output = $this->process->getErrorOutput();
|
$output = $this->process->getErrorOutput();
|
||||||
|
|
||||||
throw new \RuntimeException('Failed to open repository '.$this->repoFile.' in ' . $this->checkoutDir . "\n\n" .$output);
|
throw new \RuntimeException('Failed to open repository '.$this->repoFile.' in ' . $this->checkoutDir . "\n\n" .$output);
|
||||||
|
|
|
@ -76,7 +76,7 @@ class FossilDownloaderTest extends TestCase
|
||||||
->with($this->equalTo($expectedFossilCommand))
|
->with($this->equalTo($expectedFossilCommand))
|
||||||
->will($this->returnValue(0));
|
->will($this->returnValue(0));
|
||||||
|
|
||||||
$expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\'');
|
$expectedFossilCommand = $this->getCmd('fossil open \'repo.fossil\' --nested');
|
||||||
$processExecutor->expects($this->at(1))
|
$processExecutor->expects($this->at(1))
|
||||||
->method('execute')
|
->method('execute')
|
||||||
->with($this->equalTo($expectedFossilCommand))
|
->with($this->equalTo($expectedFossilCommand))
|
||||||
|
|
Loading…
Reference in New Issue