From e1bd2fd6dfdc57cdaec1ad5fae916396cc493113 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 24 Aug 2012 00:14:54 +0200 Subject: [PATCH] Clean ups after feedback --- src/Composer/Command/CreateProjectCommand.php | 1 - src/Composer/Command/SearchCommand.php | 2 -- src/Composer/Repository/RepositoryInterface.php | 2 +- src/Composer/Repository/StreamableRepositoryInterface.php | 6 ++++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index c4fa7abf4..9ed7cd44a 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -123,7 +123,6 @@ EOT return false; } - if ($package->getName() === $name) {var_dump((string) $package);} }); } diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index a89f6b1dc..1b3a535a0 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -63,8 +63,6 @@ EOT $repos = new CompositeRepository(array_merge(array($installedRepo), $defaultRepos)); } - $time = microtime(true); - $this->tokens = $input->getArgument('tokens'); $this->output = $output; $repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage'); diff --git a/src/Composer/Repository/RepositoryInterface.php b/src/Composer/Repository/RepositoryInterface.php index 25bc3edb7..762164dad 100644 --- a/src/Composer/Repository/RepositoryInterface.php +++ b/src/Composer/Repository/RepositoryInterface.php @@ -52,7 +52,7 @@ interface RepositoryInterface extends \Countable public function findPackages($name, $version = null); /** - * Filters all the packages throuhg a callback + * Filters all the packages through a callback * * The packages are not guaranteed to be instances in the repository * and this can only be used for streaming through a list of packages. diff --git a/src/Composer/Repository/StreamableRepositoryInterface.php b/src/Composer/Repository/StreamableRepositoryInterface.php index 36439932c..f5c694642 100644 --- a/src/Composer/Repository/StreamableRepositoryInterface.php +++ b/src/Composer/Repository/StreamableRepositoryInterface.php @@ -23,6 +23,8 @@ interface StreamableRepositoryInterface extends RepositoryInterface /** * Return partial package data without loading them all to save on memory * + * The function must return an array of package arrays. + * * The package array must contain the following fields: * - name: package name (normalized/lowercased) * - repo: reference to the repository instance @@ -32,6 +34,10 @@ interface StreamableRepositoryInterface extends RepositoryInterface * - alias: pretty alias that this package should be aliased to, optional * - alias_normalized: normalized alias that this package should be aliased to, optional * + * Any additional information can be returned and will be sent back + * into loadPackage/loadAliasPackage for completing the package loading + * when it's needed. + * * @return array */ public function getMinimalPackages();