Skip to content

[Console][QuestionHelper] Use String width() to properly move the cursor backwards #35536

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

Conversation

fancyweb
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

As a bug fix on 3.4 if the String component is installed. On 5.0, we can add a test with symfony/string as a dev dependency.

@OskarStark
Copy link
Contributor

I think its better to extract the behavior we are currently using in the string component. Its quite hard to say the bug is only fixed by a component which is not available all the time.

I think its worth, cause we fix 3.4 and 4.4. In 5.0 we should definitely use the String component then

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Feb 1, 2020
@chalasr
Copy link
Member

chalasr commented Feb 3, 2020

I agree with Oskar here. The combination of symfony/console:3.4 and symfony/string is very unlikely to happen also. Let's copy paste the unicode logic in Console up to the 5.0 branch.

@nicolas-grekas
Copy link
Member

We cannot copy/paste from String, that's a whole set of maps and logic there. We should consider this issue unfixable in 3.4/4.4 and use String in master IMHO.

@nicolas-grekas
Copy link
Member

Closing as this won't happen on 3.4.
Let's tackle this on master.

@fancyweb fancyweb deleted the console-question-helper-wcswidth branch February 3, 2020 17:19
fabpot added a commit that referenced this pull request Feb 11, 2020
…ove the cursor backwards (fancyweb)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console][QuestionHelper] Use String width() to properly move the cursor backwards

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | #35536 (comment)
| License       | MIT
| Doc PR        | -

This bug can only be fixed on master since we need to require the String component. Once the component is required, we can iterate in the Console component to use it more where it is needed.

Commits
-------

67a1f55 [Console][QuestionHelper] Use String width() to properly move the cursor backwards
symfony-splitter pushed a commit to symfony/console that referenced this pull request Feb 11, 2020
…ove the cursor backwards (fancyweb)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console][QuestionHelper] Use String width() to properly move the cursor backwards

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | symfony/symfony#35536 (comment)
| License       | MIT
| Doc PR        | -

This bug can only be fixed on master since we need to require the String component. Once the component is required, we can iterate in the Console component to use it more where it is needed.

Commits
-------

67a1f55ce1 [Console][QuestionHelper] Use String width() to properly move the cursor backwards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants