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 221460 - Install dev dependencies by default
Summary: Install dev dependencies by default
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Composer (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-05 07:54 UTC by Tomas Mysik
Modified: 2012-11-06 03:11 UTC (History)
3 users (show)

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 Tomas Mysik 2012-11-05 07:54:34 UTC
From our blog:

I just noticed that composer does not install ''dev deps. If you are using IDE for composer install, you probably want dev dependencies, so it should run composer.phar install --dev
Comment 1 Tomas Mysik 2012-11-05 07:57:47 UTC
What about 'update' command?
Comment 2 Tomas Mysik 2012-11-05 07:59:02 UTC
@umpirsky: Can you please tell us what the ideal state (--dev, --require-dev etc.) should be?

Thanks.
Comment 3 Tomas Mysik 2012-11-05 08:05:21 UTC
Since we need more info, waiting for your comment. SImply reopen this issue.

Thanks.
Comment 4 umpirsky 2012-11-05 08:06:04 UTC
First, thanks for opening a new bug.

I didn't understand question regarding ideal state, but here is what I think is nice to add.

I think both install and update should include --dev option, which will install/update dev dependencies if any. Also, there is a possibility to update only particular package with:

composer.phar update ns/package

So, it would be nice to support this.

Also, there is:

composer.phar require ns/package

command, it would be nice to add support for this as well.
Comment 5 Tomas Mysik 2012-11-05 08:14:58 UTC
Thanks for your immediate comment!

(In reply to comment #4)
> First, thanks for opening a new bug.

Nothing to thank for.

> I didn't understand question regarding ideal state, but here is what I think
> is nice to add.

The ideal state is - well, the ideal state :) I mean for you, our users. In other words, how the integration should work and look like exactly.

> I think both install and update should include --dev option, which will
> install/update dev dependencies if any.

My question is - always? Would it work for everyone? Or should this be configurable? If yes then - in IDE Options or per project?

> composer.phar update ns/package

Submit a new enhancement for it, please.

> composer.phar require ns/package

Again, submit a new enhancement for it, please.

Thanks.
Comment 6 vrtak-cz 2012-11-05 08:26:03 UTC
I'm not sure if I understand you corretly. At this https://blogs.oracle.com/netbeansphp/resource/article_images/composer-02.png screenshot is only install/update commands. But composer supports DEV dependencies (like PHPUnit etc.) and this dependencies installed only if you tell to commposer (via --dev flag).

So should be add install --dev and update --dev command to context menu.
Comment 7 umpirsky 2012-11-05 08:28:40 UTC
(In reply to comment #5)
> > I think both install and update should include --dev option, which will
> > install/update dev dependencies if any.
> 
> My question is - always? Would it work for everyone? Or should this be
> configurable? If yes then - in IDE Options or per project?
Well, I'm not sure. When you use composer from command line interface, you can decide if you want dev deps or not. For me it's fine to always install dev deps since I will use NetBeans to install deps in dev environment. I mean, how much does it have sense to install deps with NetBeans on production? But, if you want to get most of composer you can make it possible to choose if you want dev deps or not (popup or separate option install/update and install/update --dev).
> 
> > composer.phar update ns/package
> 
> Submit a new enhancement for it, please.
> 
> > composer.phar require ns/package
> 
> Again, submit a new enhancement for it, please.
> 
Will submit them later, thanks.
Comment 8 Tomas Mysik 2012-11-05 08:35:06 UTC
So, I will add 2 more actions to the Composer menu:

Install (dev)
Update (dev)

Please, speak up if it is not OK for you.

Thanks for your comments.
Comment 9 Tomas Mysik 2012-11-05 11:49:07 UTC
Fixed, please verify if possible.

http://hg.netbeans.org/web-main/rev/9beab172071a
Comment 10 Quality Engineering 2012-11-06 03:11:49 UTC
Integrated into 'main-golden', will be available in build *201211060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9beab172071a
User: Tomas Mysik <tmysik@netbeans.org>
Log: #221460 - Install dev dependencies by default