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

Implement Markdown table #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

nochso
Copy link
Contributor

@nochso nochso commented Jan 25, 2016

It's compatible to Symfony's Table class, except for configuration, styling and col/rowspan support.

Sample output comparing master to this PR:

$ php-semver-checker/bin/php-semver-checker compare php-semver-checker2/src php-semver-checker/src

Suggested semantic versioning change: MINOR

Class (MINOR)

Level Location Target Reason Code
MINOR php-semver-checker/src/PHPSemVerChecker/Console/MarkdownTable.php:12 PHPSemVerChecker\Console\MarkdownTable Class was added. V014
PATCH php-semver-checker/src/PHPSemVerChecker/Reporter/Reporter.php:73 PHPSemVerChecker\Reporter\Reporter::outputTable [protected] Method implementation changed. V024

[Scanned files] Before: 1, After: 2, Identical: 60
Time: 0.058 seconds, Memory: 7.67 MB

Implements #71

@nochso
Copy link
Contributor Author

nochso commented Jan 26, 2016

Ok, namespace was changed and phpdocs were fixed.

@tomzx
Copy link
Owner

tomzx commented Jan 27, 2016

After testing it out, I'm not sure I want it to replace the Table itself in all cases. I think it would be more appropriate to have an option to specify the output format, and only in the case where --format=markdown would we use this markdown table.

Opinion?

@nochso
Copy link
Contributor Author

nochso commented Jan 27, 2016

Well, why? If you're missing the styled headers, those can be added. Otherwise I don't know if anyone even noticed the difference..

I suppose we could reuse SymfonyStyle, overriding its table(). That new Style class would then switch table implementations based on --format-table?

In another project I'm preparing a SymfonyStyle / OutputStyle in a base Command's initialize() and assigning it to a field io. That way you simply write $this->io->table() in the commands and you're assured that all commands rely on the same style.

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.

None yet

2 participants