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

Should we add support for including environment part of message? #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petrknap
Copy link
Contributor

@petrknap petrknap commented Aug 8, 2018

Added support for including environment part of message for console commands

{
public static function colored(KernelInterface $kernel, string $message): string
{
return sprintf($message, sprintf(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this require $message argument to have an %s modifier inside it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it requires %s in the message.

@halaxa
Copy link
Contributor

halaxa commented Aug 10, 2018

If we implement is as a trait, you need no $kernel parameter and it will be more readable and usable. What do you think?

@petrknap
Copy link
Contributor Author

The trait is another way how to implement it and it may be better. Maybe we should place it in separated package and keep Symfony Up small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants