Skip to content

Conversation

@henrikbjorn
Copy link
Contributor

Installer::setNoSuggest() now controls if suggested packages should be
listed or not.

When using InstallCommand the setNoSuggest method is determained by
--no-dev option or --no-suggest option to limit the output when
installing for a production environment.

When using UpdateCommand it is only determained by the --no-suggest option.

Fix #2066

Installer::setNoSuggest() now controls if suggested packages should be
listed or not.

When using InstallCommand the setNoSuggest method is determained by
--no-dev option or --no-suggest option to limit the output when
installing for a production environment.

Fix #2066
@henrikbjorn
Copy link
Contributor Author

ping @Seldaek

@jakoch
Copy link
Contributor

jakoch commented Jul 28, 2013

The intention is to create a less verbose output. Seems reasonable.
I would suggest to not add a new CLI argument for this, but to combine this idea with the already given verbosity levels (v|vv|vvv). This might be implemented via a verbosity level check, around the output of the suggestions.

@henrikbjorn
Copy link
Contributor Author

@jakoch this would mean the default would have to be changed, as it isnt possible to define a verbosity level lower than the current one.

@jakoch
Copy link
Contributor

jakoch commented Jul 29, 2013

We might hide the suggestions by default and show them with "-v".

@stof
Copy link
Contributor

stof commented Jul 29, 2013

but then some stuff should be moved to a higher verbosity. -v is already outputting lots of stuff

@Seldaek
Copy link
Member

Seldaek commented Aug 1, 2013

The question really is whether this suggest outputs makes any sense at all? I can't remember ever looking at it.

I think moving it to -v might be better, because I suspect most people don't care about it. I'll ask for feedback.

@willdurand
Copy link

The feature makes sense in development, I'd like to keep it as is.

I don't often browse Packagist, so reading suggested packages in the terminal is quite useful. Is outputting a few lines at the end really a big deal? oO

@schmunk42
Copy link
Contributor

I am using suggest i.e. here.
The question is, how important is the information you'll find in suggest?
And how can you access it, when you haven't seen it on installation, like composer.phar suggest?

@jakoch
Copy link
Contributor

jakoch commented Aug 1, 2013

In case you haven't seen it or missed it on installation: composer --dry-run
With suggestions moved to -v composer --dry-run -v. This makes sense - for me, at least.
So the developer is able to loop up the suggestions, before setting them up and installing them.
He still has to take action; which leads to another (off-topic) idea: composer --install --install-suggests.

@henrikbjorn
Copy link
Contributor Author

@willdurand for one of our projects at work it is well over 20 lines.

@willdurand
Copy link

I don't think it's a big deal. It probably outputs more stuff before anyway.

@stof
Copy link
Contributor

stof commented Aug 1, 2013

@jakoch --install-suggests cannot be done: suggestions are not constraint ranges.

and the initial implementation of suggestions was allowing to install them, but it was just a broken stuff (you may want to install only some of the suggestions, and some suggestions might be incompatible together, making the resolution fail, etc...)

@schmunk42
Copy link
Contributor

@stof Totally right! I think --install-suggests could be dopped.
E.g. you could also suggest to install nodejs, which is a system package and not really available through composer.

@kendeca
Copy link

kendeca commented Aug 1, 2013

I vote for a) I love this stuff, keep it as it is.

@henrikbjorn
Copy link
Contributor Author

bump? @Seldaek

@deizel
Copy link

deizel commented Mar 14, 2015

👍 to less noise in deploy logs (Jenkins, etc):

composer install --prefer-dist --optimize-autoloader
<snip>
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing raven/raven (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing videlalvaro/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
kamisama/php-resque-ex suggests installing fresque/fresque (A command line tool to manage your workers)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
slywalker/boost_cake suggests installing twbs/bootstrap (Bootstrap framework)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating optimized autoload files

Much cleaner as PR suggests:

composer install --prefer-dist --optimize-autoloader --no-suggest
<snip>
Generating optimized autoload files

@mirfilip
Copy link

@Seldaek any update on this?

@henrikbjorn
Copy link
Contributor Author

Closing this one as composer only shows suggested packages if we are --dev.

https://github.com/composer/composer/blob/master/src/Composer/Installer.php#L244

@staabm staabm mentioned this pull request Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable suggest output

9 participants