Skip to content

[Console] Added more semantic commands to detect verbosity #8640

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

Closed
wants to merge 2 commits into from

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Aug 2, 2013

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

@@ -98,6 +98,31 @@ public function getVerbosity()
return $this->verbosity;
}

public function isVerbosityQuiet()
{
return static::VERBOSITY_QUIET === $this->verbosity;
Copy link
Contributor

Choose a reason for hiding this comment

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

why static?

Copy link
Member Author

Choose a reason for hiding this comment

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

I used to use static everywhere ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

there should be a use case to use static

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed to self, but Why did you said that ? static is slower than self ?

Copy link
Contributor

Choose a reason for hiding this comment

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

The meaning is different you know. Its like private vs protected.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it was only for LSB. Can you tell me more about this private vs protected ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes when using LSB you indirectly expose an extension point (similar to protected methods instead of private). And I don't see why somebody would want to override these constants in subclasses. So there is no need to expose this extension point without use case.

lyrixx added 2 commits August 8, 2013 18:28
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a
@fabpot fabpot closed this in 041b04f Aug 9, 2013
@lyrixx lyrixx deleted the console-verbosity branch August 9, 2013 06:54
lancergr added a commit to lancergr/symfony that referenced this pull request Sep 12, 2013
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony#8640
| License       | MIT
| Doc PR        |
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.

4 participants