This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258379 - [InvalidArgumentException] Package not found when adding Composer dependency
Summary: [InvalidArgumentException] Package not found when adding Composer dependency
Status: RESOLVED DUPLICATE of bug 258264
Alias: None
Product: php
Classification: Unclassified
Component: Composer (show other bugs)
Version: 8.0.2
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-15 12:55 UTC by teelo
Modified: 2016-03-15 14:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description teelo 2016-03-15 12:55:31 UTC
Steps to reproduce
------------------
0. Configure Composer.
1. Create a new PHP (command-line) project.
2. Initialize Composer: Right-click project > "Composer" > "Init".
3. Validate Composer: Right-click project > "Composer" > "Validate".
4. Self-update Composer: Right-click project > "Composer" > "Self Update".
5. Add dependency: Right-click project > "Composer" > "Add Dependency".
6. Search any known package, e.g. "logger/logger".
7. See error in console output ("Output" tab):

> [InvalidArgumentException]
> Package logger/logger not found

8. Try to select any other package to verify. The error repeats itself.

How to fix?
-----------
Composer is called by NetBeans with these options:
C:\Path\to\Php\php.exe C:\Path\to\Composer\bin\composer.phar --no-interaction --no-ansi show "logger/logger"

The problem is, that the "show" command seems to need some options, too. If you use "show --all" instead of only "show", then there is no error and the output looks like this:

> name     : logger/logger
> descrip. :
> keywords :
> versions : dev-master, 0.0.1
> type     : library
> license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
> source   : [git] https://github.com/LoggerEssentials/Logger.git c0de6fe6d88b4726d2e5619aaaacefa6ca0ea0a5
> dist     : [zip] https://api.github.com/repos/LoggerEssentials/Logger/zipball/c0de6fe6d88b4726d2e5619aaaacefa6ca0ea0a5 c0de6fe6d88b4726d2e5619aaaacefa6ca0ea0a5
> names    : logger/logger
> 
> autoload
> classmap
> /
> 
> requires
> psr/log 1.0
> 
> suggests
> logger/essentials Advanced logging component library


My environment
--------------
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18
System: Windows 8 version 6.2 running on amd64; Cp1252; de_DE (nb)
User directory: C:\Users\Who\AppData\Roaming\NetBeans\8.0.2
Cache directory: C:\Users\Who\AppData\Local\NetBeans\Cache\8.0.2
Comment 1 Tomas Mysik 2016-03-15 14:41:23 UTC
Already fixed in a dev build. Thanks for reporting.

*** This bug has been marked as a duplicate of bug 258264 ***