Skip to content

[console] makes descriptors use output instead of returning a string #8451

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
Jul 31, 2013

Conversation

jfsimon
Copy link
Contributor

@jfsimon jfsimon commented Jul 8, 2013

This PR changes DescriptorInterface::describe($object, array $options = array()) method signature to describe(OutputInterface $output, $object, array $options = array()) and all subsequent implementations.

It's now possible to use helpers inside descriptors.
That was not easy!

@lyrixx this is all for you
@fabpot I just added one new class

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #8371

@lyrixx
Copy link
Member

lyrixx commented Jul 8, 2013

@jfsimon Thanks. you are the best ;)

}

$blocks[] = implode("\n", array_map(function ($commandName) {
$this->write("\n\n");
$this->write(implode("\n", array_map(function ($commandName) {
Copy link
Member

Choose a reason for hiding this comment

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

you ould simplify this: $output->write() accepts an arrat of lines too

@@ -0,0 +1,37 @@
<?php

Copy link
Member

Choose a reason for hiding this comment

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

missing headers

[console] made descriptors use output instead of returning a string
[console] updated descriptors usage
[console] fixed descriptors usage & tests
[console] applied advices from github
[Console] applied advices from github

updated changelog
fabpot added a commit that referenced this pull request Jul 31, 2013
This PR was merged into the master branch.

Discussion
----------

[console] makes descriptors use output instead of returning a string

This PR changes `DescriptorInterface::describe($object, array $options = array())` method signature to `describe(OutputInterface $output, $object, array $options = array())` and all subsequent implementations.

It's now possible to use helpers inside descriptors.
That was not easy!

@lyrixx this is all for you
@fabpot I just added one new class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8371

Commits
-------

b9fa52c [Console] made descriptors use output instead of returning a string
@fabpot fabpot merged commit b9fa52c into symfony:master Jul 31, 2013
@lyrixx
Copy link
Member

lyrixx commented Jul 31, 2013

Thanks @jfsimon

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