Skip to content

Comments

Added PIE version banner to all commands#202

Merged
asgrim merged 1 commit intophp:mainfrom
asgrim:pie-version-banner
Mar 12, 2025
Merged

Added PIE version banner to all commands#202
asgrim merged 1 commit intophp:mainfrom
asgrim:pie-version-banner

Conversation

@asgrim
Copy link
Contributor

@asgrim asgrim commented Mar 12, 2025

Adds a version banner to all commands, e.g.:

$ bin/pie install asgrim/example-pie-extension
🥧 PHP Installer for Extensions (PIE), dev-main, from The PHP Foundation
This command may need elevated privileges, and may prompt you for your password.
You are running PHP 8.3.17
Target PHP installation: 8.3.17 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension

@asgrim asgrim added the enhancement New feature or request label Mar 12, 2025
@asgrim asgrim added this to the 0.9.0 milestone Mar 12, 2025
@asgrim asgrim self-assigned this Mar 12, 2025
@asgrim asgrim merged commit 0eae70a into php:main Mar 12, 2025
19 checks passed
@asgrim asgrim deleted the pie-version-banner branch March 12, 2025 20:40
@stof
Copy link
Contributor

stof commented Apr 15, 2025

shouldn't this be sent to STDERR instead, to avoid breaking the usage of piping the command output to another process ?

@remicollet
Copy link
Member

shouldn't this be sent to STDERR instead, to avoid breaking the usage of piping the command output to another process ?

Yes it will work (for bash completion)
Another way is to display the banner only if a tty is used (no redirect)

@asgrim
Copy link
Contributor Author

asgrim commented Apr 15, 2025

At the moment we are not really promising a stable textual output "API", but the feedback is noted. #217 will improve this anyway 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants