Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Add box-double table style #26693

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
Mar 30, 2018

Conversation

maidmaid
Copy link
Contributor

@maidmaid maidmaid commented Mar 28, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25456 (review)
License MIT
Doc PR /

In #25456 (review) @javiereguiluz suggested to have a complete configuration for style table. It was a nice idea, but not yet implemented. The box-drawing characters allow to combine different styles (like double/single lines). This PR give the possibility to use them.

The previous #25456 introduced the box-drawing characters; this PR exploits all their strength.

image

See https://gist.github.com/maidmaid/3eb55afc4f2857cae89d7ac43d7943ae for some examples.

UPGRADE-4.1.md Outdated
Serializer
----------

* Decoding XML with `XmlEncoder` now ignores comment node types by default.
Copy link
Member

Choose a reason for hiding this comment

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

Why are you removing these ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bad merge. Fixed.

* </code>
*
* @param string $outside Outside border char (see #1 of example)
* @param string|null $inside Outside border char (see #2 of example), equals $outside if null
Copy link
Member

Choose a reason for hiding this comment

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

should be Inside

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

*/
public function setVerticalBorderChar($verticalBorderChar)
{
$this->verticalBorderChar = $verticalBorderChar;
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1. Use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

Deprecating a non-internal method in favor of an internal one looks weird to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one isn't internal. Are you talking about getBorderChars() maybe?

Copy link
Member

Choose a reason for hiding this comment

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

since Symfony 4.1, use set...

Copy link
Contributor Author

@maidmaid maidmaid Mar 30, 2018

Choose a reason for hiding this comment

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

Fixed.

@maidmaid maidmaid force-pushed the console-box-double branch 3 times, most recently from a8d1195 to 8c2a59e Compare March 28, 2018 12:42
@javiereguiluz javiereguiluz added this to the 4.1 milestone Mar 28, 2018
*/
public function setVerticalBorderChar($verticalBorderChar)
{
$this->verticalBorderChar = $verticalBorderChar;
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1. Use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

since Symfony 4.1, use set...

*/
public function getVerticalBorderChar()
{
return $this->verticalBorderChar;
@trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1. Use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

same here, use a comma instead of a dot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@maidmaid maidmaid force-pushed the console-box-double branch from 8c2a59e to 463f986 Compare March 30, 2018 11:44
@fabpot
Copy link
Member

fabpot commented Mar 30, 2018

Thank you @maidmaid.

@fabpot fabpot merged commit 463f986 into symfony:master Mar 30, 2018
fabpot added a commit that referenced this pull request Mar 30, 2018
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] Add box-double table style

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25456 (review)
| License       | MIT
| Doc PR        | /

In #25456 (review) @javiereguiluz suggested to have a complete configuration for style table. It was a nice idea, but not yet implemented. The box-drawing characters allow to combine different styles (like double/single lines). This PR give the possibility to use them.

The previous #25456 introduced the box-drawing characters; this PR exploits all their strength.

![image](https://user-images.githubusercontent.com/4578773/38136596-d8f4f46c-3462-11e8-9a0d-dcfae6039d18.png)

See https://gist.github.com/maidmaid/3eb55afc4f2857cae89d7ac43d7943ae for some examples.

Commits
-------

463f986 Add box-double table style
@fabpot fabpot mentioned this pull request May 7, 2018
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