composer/composer — Issue #334: Notice when requiring package that does not exist
Author: igorw
Created: 2012-02-20 09:15:09+00:00
State: open

# composer.json

{
"require": {
"foobar": "*"
}
}

# composer log

$ ~/composer install
Installing dependencies
PHP Notice: Undefined offset: 0 in phar:///Users/igor/composer/src/Composer/DependencyResolver/Solver.php on line 2
PHP Stack trace:
PHP 1. {main}() /Users/igor/composer:0
PHP 2. require() /Users/igor/composer:15
PHP 3. Composer\Console\Application->run() phar:///Users/igor/composer/bin/composer:13
PHP 4. Symfony\Component\Console\Application->run() phar:///Users/igor/composer/src/Composer/Console/Application.php:2
PHP 5. Composer\Console\Application->doRun() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/igor/composer/src/Composer/Console/Application.php:2
PHP 7. Symfony\Component\Console\Command\Command->run() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:2
PHP 8. Composer\Command\InstallCommand->execute() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2
PHP 9. Composer\Command\InstallCommand->install() phar:///Users/igor/composer/src/Composer/Command/InstallCommand.php:10
PHP 10. Composer\DependencyResolver\Solver->solve() phar:///Users/igor/composer/src/Composer/Command/InstallCommand.php:10
PHP 11. Composer\DependencyResolver\Solver->disablePolicyRules() phar:///Users/igor/composer/src/Composer/DependencyResolver/Solver.php:2

Notice: Undefined offset: 0 in phar:///Users/igor/composer/src/Composer/DependencyResolver/Solver.php on line 2

Call Stack:
0.0019 638840 1. {main}() /Users/igor/composer:0
0.0050 733464 2. require('phar:///Users/igor/composer/bin/composer') /Users/igor/composer:15
0.0308 2069784 3. Composer\Console\Application->run() phar:///Users/igor/composer/bin/composer:13
0.0386 2372496 4. Symfony\Component\Console\Application->run() phar:///Users/igor/composer/src/Composer/Console/Application.php:2
0.0417 2582176 5. Composer\Console\Application->doRun() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0691 3600064 6. Symfony\Component\Console\Application->doRun() phar:///Users/igor/composer/src/Composer/Console/Application.php:2
0.0737 3600064 7. Symfony\Component\Console\Command\Command->run() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:2
0.0770 3600512 8. Composer\Command\InstallCommand->execute() phar:///Users/igor/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:2
0.1129 5266880 9. Composer\Command\InstallCommand->install() phar:///Users/igor/composer/src/Composer/Command/InstallCommand.php:10
16.6129 30300624 10. Composer\DependencyResolver\Solver->solve() phar:///Users/igor/composer/src/Composer/Command/InstallCommand.php:10
16.7511 30907552 11. Composer\DependencyResolver\Solver->disablePolicyRules() phar:///Users/igor/composer/src/Composer/DependencyResolver/Solver.php:2

[UnexpectedValueException]
Package foobar was not found in the package pool, check the name for typos.

install [--prefer-source] [--dry-run] [--no-install-recommends] [--install-suggests]