Skip to content

Adds a new hook to tweak command description at runtime #10

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
Jun 10, 2024

Conversation

tucksaun
Copy link
Member

For one feature I'm currently implementing I need to be able to tweak a command description based on some runtime information. My main use case is to customize the description (basically rendering it as a template but with some context values that we can't provide generically). So I ended up with this solution.

The idea is to allow one to register a hook that will be called during command help rendering to compute the command description.

For one feature I'm currently implementing I need to be able to tweak a command description based on some runtime information.
My main use case is to customize the description (basically rendering it as a template but with some context values that we can't provide generically).
So I ended up with this solution.

The idea is to allow one to register a hook that will be called during command help rendering to compute the command description.
@fabpot fabpot merged commit 4351e24 into symfony-cli:main Jun 10, 2024
1 check passed
@tucksaun tucksaun deleted the feat/description-func branch June 10, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants