Skip to content

Added PIE version banner to all commands #202

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

Merged
merged 1 commit into from
Mar 12, 2025
Merged

Conversation

asgrim
Copy link
Collaborator

@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
Collaborator 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