composer/composer — Issue #374: using the search command results in fatal errors
Author: jlleblanc
Created: 2012-02-28 17:13:46+00:00
State: open

I'm trying to use the search command, but I wind up with a pile of fatal errors. This is using version 0e6cf61.

$ php composer.phar search querypath/QueryPath
No composer.json found in the current directory, showing packages from packagist.org
PHP Notice: Undefined variable: localRepo in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7
PHP Stack trace:
PHP 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
PHP 2. require() /Users/josephleblanc/Sites/demos/composer/composer.phar:15
PHP 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
PHP 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

Notice: Undefined variable: localRepo in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7

Call Stack:
0.0024 707528 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
0.0026 705432 2. require('phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer') /Users/josephleblanc/Sites/demos/composer/composer.phar:15
0.0130 1911368 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
0.0158 2177624 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0172 2366984 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0257 3293360 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0264 3293360 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0269 3294064 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

PHP Fatal error: Call to a member function hasPackage() on a non-object in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7
PHP Stack trace:
PHP 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
PHP 2. require() /Users/josephleblanc/Sites/demos/composer/composer.phar:15
PHP 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
PHP 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

Fatal error: Call to a member function hasPackage() on a non-object in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7

Call Stack:
0.0024 707528 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
0.0026 705432 2. require('phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer') /Users/josephleblanc/Sites/demos/composer/composer.phar:15
0.0130 1911368 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
0.0158 2177624 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0172 2366984 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0257 3293360 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0264 3293360 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0269 3294064 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

jlleblanc:composer josephleblanc$ php composer.phar search querypath/QueryPath
No composer.json found in the current directory, showing packages from packagist.org
PHP Notice: Undefined variable: localRepo in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7
PHP Stack trace:
PHP 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
PHP 2. require() /Users/josephleblanc/Sites/demos/composer/composer.phar:15
PHP 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
PHP 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

Notice: Undefined variable: localRepo in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7

Call Stack:
0.0025 707528 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
0.0027 705432 2. require('phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer') /Users/josephleblanc/Sites/demos/composer/composer.phar:15
0.0137 1911368 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
0.0166 2177624 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0180 2366984 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0265 3293360 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0272 3293360 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0277 3294064 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

PHP Fatal error: Call to a member function hasPackage() on a non-object in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7
PHP Stack trace:
PHP 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
PHP 2. require() /Users/josephleblanc/Sites/demos/composer/composer.phar:15
PHP 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
PHP 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
PHP 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2

Fatal error: Call to a member function hasPackage() on a non-object in phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Command/SearchCommand.php on line 7

Call Stack:
0.0025 707528 1. {main}() /Users/josephleblanc/Sites/demos/composer/composer.phar:0
0.0027 705432 2. require('phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer') /Users/josephleblanc/Sites/demos/composer/composer.phar:15
0.0137 1911368 3. Composer\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/bin/composer:13
0.0166 2177624 4. Symfony\Component\Console\Application->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0180 2366984 5. Composer\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0265 3293360 6. Symfony\Component\Console\Application->doRun() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/src/Composer/Console/Application.php:2
0.0272 3293360 7. Symfony\Component\Console\Command\Command->run() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0277 3294064 8. Composer\Command\SearchCommand->execute() phar:///Users/josephleblanc/Sites/demos/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2