Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer installation verbosity tip #4099

Closed
wants to merge 1 commit into from

Conversation

dannykopping
Copy link
Contributor

Added installation verbosity tip, for users with slow internet connections.

With love from slow South Africa 🌍

@stof
Copy link
Member

stof commented Aug 6, 2014

you should rebase your branch on top of the upstream master branch to remove these 2 weird merge commits from the history.

When creating a feature branch, it should generally be created based on the state of the upstream master branch to avoid such weirdness

@dannykopping
Copy link
Contributor Author

Thanks, yeah I should've done that... It's done now

@javiereguiluz
Copy link
Member

👍 thanks for adding these tips @dannykopping!

However, for the tip added in the Getting Started tutorial I think that we should be more explicit about what does "add the -vvv flag" mean. This tutorial is targeted for newcomers and it could be hard for some of them to correctly understand that phrase. Maybe we should display something like $ composer -vvv ... But before making any change, let's see what do @weaverryan @wouterj and @xabbuh think about this.

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

@javiereguiluz I like adding the example code block. I would also provide an example code block for the first part of the tip. Maybe it's also better to split them into two tips as they are not really related.

I would then suggest to change the wording a bit, so that you first explain the problem and provide a solution then. I think something like this is good:

.. tip::

    Sometimes, especially when your Internet connection is slow, running the
    ``composer`` command may look like it does nothing at all. You can use
    the ``-vvv`` flag to let Composer print all activities it is doing in
    the background:

    .. code-block:: bash

        $ php composer.phar create-project -vvv ...

@dannykopping @javiereguiluz What do you think?

@javiereguiluz
Copy link
Member

@xabbuh I love your proposal! The only minor thing is that I think that Internet should always be capitalized.

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

@javiereguiluz 👍 (updated the comment)

@dannykopping
Copy link
Contributor Author

Much better! Thanks

@@ -24,7 +24,13 @@ git repository:

.. code-block:: bash

$ php composer.phar create-project symfony/framework-standard-edition path/ '~2.3'
$ php composer.phar create-project symfony/framework-standard-edition path/ '~2.5'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the oldest still maintained Symfony version. So I don't think that this should be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, sorry - I was bringing this in line with the changes i made in #4091

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, let's change this back :)

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

@dannykopping What do you think about also adding example code blocks to the tips?

@dannykopping
Copy link
Contributor Author

In this instance specifically, or in general?

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

I think it's worth to add it to all tips you added for the -vvv flag.

@dannykopping
Copy link
Contributor Author

Sure, but what would you suggest putting in the 'code block'?

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

I would suggest the tip to be like what I suggested in this comment.

@dannykopping
Copy link
Contributor Author

OK - I will clean this up tonight and implement the suggestions

@wouterj
Copy link
Member

wouterj commented Aug 9, 2014

Hmm, I like what you're trying to solve here, but I'm not sure this is the correct option.

-vvv is the DEBUG verbosity. Installing the framework isn't about debugging at all, it's all about usage.

So what is the original problem? I believe it's the fact that Composer is not verbose enough at normal verbosity. I think we should solve that instead, e.g. by using the ProgressBar helper to show the progress instead of showing all details about every action done by Composer.

What do you think @dannykopping ? If you agree, I would recommend to open an issue in composer/composer and see what the composer guys think about this.
If you don't agree, that's fine! Then I would suggest to use @xabbuh's proposal and also move this to the book installation chapter.

@dannykopping
Copy link
Contributor Author

I really like that idea, given that we have the ProgressBar helper.
Imagine you're trying to install Symfony on a 4Mb DSL connection (2Mb is the median connection speed in South Africa) - it can appear as though something has stalled oftentimes; the reason why I suggested the DEBUG level is because this at least shows you that Composer is doing work.

I'll definitely add an issue in composer/composer - nice idea!

@dannykopping
Copy link
Contributor Author

It's already planned apparently
composer/composer#2809

Maybe I'll put something together over the weekend and send you a PR and a penny for your thoughts @wouterj?

@xabbuh
Copy link
Member

xabbuh commented Aug 10, 2014

I'm not convinced that the progress bar will resolve the issue that made @dannykopping adding the -vvv flag. In case of slow internet connections, the progress bar would move forward so slowly that you wouldn't recognise any difference, would you?

@dannykopping
Copy link
Contributor Author

That's a good point, but if it could be customised to show the bytes downloaded vs bytes total - that would resolve it. I'm thinking of something like a wget-style output

@wouterj
Copy link
Member

wouterj commented Aug 10, 2014

@xabbuh the same applies to the -vvv flag.

@weaverryan
Copy link
Member

Thanks Danny for starting this! I'm ok with merging this in, but I think getting a progress bar added to Composer is much much more impactful. I hear people complain about this all the time - I would love to at least be able to show progress (and even better would be to speed up Composer - I didn't realize how many JSON requests it makes for metadata).

@dannykopping I just left you 2 small comments.

Thanks!

@stof
Copy link
Member

stof commented Aug 18, 2014

@weaverryan for most people, the slow part is not the metadata loading, but the dependency resolution itself

@weaverryan
Copy link
Member

@stof I always thought that too, but when I run -vvv, those downloads take at least a significant amount of time (and since there's no while the dep resolution happens, I'm not sure how long that part takes).

@weaverryan
Copy link
Member

These messages look good to me now. Thanks Danny!

weaverryan added a commit that referenced this pull request Oct 19, 2014
weaverryan added a commit that referenced this pull request Oct 19, 2014
weaverryan added a commit that referenced this pull request Oct 19, 2014
* 2.3:
  [#4099] Adding an extra tip
  Added Composer installation tip
  Clarifying a bit more that you're passing variables into your controller
  Update http_cache.rst

Conflicts:
	cookbook/workflow/new_project_git.rst
weaverryan added a commit that referenced this pull request Oct 19, 2014
* 2.3:
  [#4099] Trying to get the markup just right
weaverryan added a commit that referenced this pull request Oct 19, 2014
* 2.5:
  [#4099] Trying to get the markup just right
  [#4099] Adding an extra tip
  Added Composer installation tip
  Clarifying a bit more that you're passing variables into your controller
  Update http_cache.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants