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

[Console] Fix table trailing backslash #30911

Merged
merged 1 commit into from Apr 6, 2019
Merged

Conversation

maidmaid
Copy link
Contributor

@maidmaid maidmaid commented Apr 6, 2019

Q A
Branch? 4.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30725
License MIT
Doc PR /
(new Table($output))
    ->setColumnMaxWidth(0, 5)
    ->setRows([['1234\6']])
    ->render();
;

before:

+-------+
| 1234<fg=default;bg=default> |
| 6     |
+-------+

after:

+-------+
| 1234\ |
| 6     |
+-------+

#EUFOSSA

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

(can you confirm the issue doesn't exist on 3.4?)

@nicolas-grekas
Copy link
Member

Can you please have a look at #30852?

@maidmaid
Copy link
Contributor Author

maidmaid commented Apr 6, 2019

4.2 because setColumnMaxWidth() was introduced for that version.
cf https://symfony.com/blog/new-in-symfony-4-2-console-tables-improvements#setting-the-max-width-of-columns

@maidmaid
Copy link
Contributor Author

maidmaid commented Apr 6, 2019

@nicolas-grekas About #30852, it's 2 different problems IMO : this PR relates the trailing \, whereas the other relates the too long contents.

@fabpot
Copy link
Member

fabpot commented Apr 6, 2019

Thank you @maidmaid.

@fabpot fabpot merged commit 48f020f into symfony:4.2 Apr 6, 2019
fabpot added a commit that referenced this pull request Apr 6, 2019
This PR was merged into the 4.2 branch.

Discussion
----------

[Console] Fix table trailing backslash

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30725
| License       | MIT
| Doc PR        | /

```php
(new Table($output))
    ->setColumnMaxWidth(0, 5)
    ->setRows([['1234\6']])
    ->render();
;
```
before:

```
+-------+
| 1234<fg=default;bg=default> |
| 6     |
+-------+
```

after:

```
+-------+
| 1234\ |
| 6     |
+-------+
```

#EUFOSSA

Commits
-------

48f020f Fix table trailing backslash
@maidmaid maidmaid deleted the table-backslash branch April 6, 2019 16:37
@fabpot fabpot mentioned this pull request Apr 16, 2019
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.

None yet

6 participants