Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Convert questions to a string, fixes #243 #244

Merged
merged 2 commits into from
Mar 21, 2018
Merged

Convert questions to a string, fixes #243 #244

merged 2 commits into from
Mar 21, 2018

Conversation

geerteltink
Copy link
Member

Since symfony/console 4 questions only accept a question string. Looking at its history, this was always the case and is wrong in the composer docblock.

see: https://github.com/symfony/console/blob/4.0/Question/Question.php#L37
see: https://github.com/composer/composer/blob/1.6/src/Composer/IO/IOInterface.php#L106

@geerteltink geerteltink added this to the 3.0.1 milestone Mar 21, 2018
Copy link
Member

@michalbundyra michalbundyra left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@xtreamwayz It's wrong milestone, should be 3.0.2.
3.0.1 is already released.

'Questions must be a string since symfony/console:4.0'
);

self::assertThat(
Copy link
Member

Choose a reason for hiding this comment

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

Why not assertTrue?

Copy link
Member Author

@geerteltink geerteltink Mar 21, 2018

Choose a reason for hiding this comment

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

Good question.

@weierophinney any reason you wrote it like this?

Copy link
Member

Choose a reason for hiding this comment

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

I think you want to ask @weierophinney ;-)

Copy link
Member Author

Choose a reason for hiding this comment

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

Works for me :)

Copy link
Member

Choose a reason for hiding this comment

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

Honestly, because it's how custom assertions are demonstrated in the manual: https://phpunit.de/manual/current/en/extending-phpunit.html

I'm fine with either approach.

Copy link
Member

Choose a reason for hiding this comment

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

Hm... in the docs is just example, maybe a bit unfortunate, because assertTrue is one of the available assertions.

@geerteltink
Copy link
Member Author

It's wrong milestone, should be 3.0.2.
3.0.1 is already released.

I just noticed when creating a new project :)

Copy link
Member

@weierophinney weierophinney left a comment

Choose a reason for hiding this comment

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

Looks good, and I think we may need to do similar in the zend-component-installer.

'Questions must be a string since symfony/console:4.0'
);

self::assertThat(
Copy link
Member

Choose a reason for hiding this comment

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

Honestly, because it's how custom assertions are demonstrated in the manual: https://phpunit.de/manual/current/en/extending-phpunit.html

I'm fine with either approach.

@geerteltink
Copy link
Member Author

Looks good, and I think we may need to do similar in the zend-component-installer.

Working on it.

@weierophinney weierophinney merged commit 828c97e into zendframework:master Mar 21, 2018
weierophinney added a commit that referenced this pull request Mar 21, 2018
weierophinney added a commit that referenced this pull request Mar 21, 2018
weierophinney added a commit that referenced this pull request Mar 21, 2018
@weierophinney
Copy link
Member

Thanks, @xtreamwayz!

weierophinney added a commit to zendframework/zend-component-installer that referenced this pull request Mar 21, 2018
@geerteltink geerteltink deleted the hotfix/question-as-a-string branch March 21, 2018 20:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants