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

Add links to repo to show/outdated commands package lists #10430

merged 2 commits into from Jan 5, 2022


Copy link

@Seldaek Seldaek commented Jan 4, 2022

fixes #9367


If someone thinks of another good use case for this, do tell.

Copy link

@ThomasLandauer ThomasLandauer commented Jan 4, 2022

The general problem here is that there are two "standards" on how to display links in a console:

  1. Old-fashioned: Display the URL verbatim:, and then rely on the terminal's auto-detection to make it clickable. This is (as far as I know) supported by every terminal.
  2. Fancy (i.e. HTML-like): Add some special characters to allow displaying a different link text. This is supported by some terminals:

I don't know how the adoption of (2) will progress. But for Konsole (=default in KDE) it doesn't look too good:
And (frankly) I'm also not sure if it's a good idea at all...

What I originally had in mind in #9367 was to display the link instead of the description:

symfony/polyfill-ctype   v1.23.0

Or maybe introduce some configuration to let the user decide?

Copy link
Member Author

@Seldaek Seldaek commented Jan 4, 2022

Yes to me the critical links that need to be seen need to be of the first type as even the dumbest terminal will let you copy paste the url. Here though it's kinda nice to have functionality and I feel like this approach lets us pack more info and functionality in the same amount of text/output which is good.

Letting the user decide is always an option but it also adds complexity across the board (in code, docs, cognitive for users,..) so in this case I don't particularly feel it's justified as one can also easily get the info somewhere else if needed.

Copy link

@staabm staabm commented Jan 5, 2022

Looking at it, it might be usefull to have the version number link to packagist

Copy link
Member Author

@Seldaek Seldaek commented Jan 5, 2022

@staabm that's unfortunately quite messy to do as we don't have a direct link to packagist available there.

I have now added more links in various other commands though.

Copy link
Member Author

@Seldaek Seldaek commented Jan 5, 2022

Think I am going to merge as is, sorry @ThomasLandauer if this doesn't quite match what you had in mind, but note that you can use --format=json output to get to the URLs otherwise. Combined with jq this should kinda easily let you script this yourself.

@Seldaek Seldaek merged commit b96c419 into composer:main Jan 5, 2022
17 checks passed
@Seldaek Seldaek deleted the add_links branch Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

3 participants