kint-php / kint

Kint - Advanced PHP dumper
https://kint-php.github.io/kint/
MIT License
2.77k stars 291 forks source link

$tabularData on examples/overview.php #219

Closed DRSDavidSoft closed 7 years ago

DRSDavidSoft commented 7 years ago

Kint Version: (Latest as of writing this )

How it is supposed to look: image

How it does look right now: image

Proposed fix: Line 118: for ( $i = 1; $i < 9; $i++ ) { Line 127: if ( $i % 3 == 0 ) {

jnvsor commented 7 years ago

If you've already fixed it, leave a pull request

DRSDavidSoft commented 7 years ago

@jnvsor, Created a PR on #220.

jnvsor commented 7 years ago

Tabluar data has been moved into a plugin in Kint 2.0, which has a stricter take on tables to begin with. (Allows empty, but not missing keys) Is this issue still relevant?

DRSDavidSoft commented 7 years ago

I should take a look at your unit tests first before giving any definite conclusions.

And BTW, I'm really excited about Kint 2.0, it promises way more flexibility and seems to be more powerful than Kint 1.x, however I think that while the new plugin is stricter, it should still allow missing keys, at least using a pre-initialization config.

Do you agree on this?

jnvsor commented 7 years ago

Perhaps. But the logic for missing keys gets a lot harder to reason with: Hence this issue

I should take a look at your unit tests first before giving any definite conclusions.

Hah! Good one!... Oh... You're serious?

Joking aside, Kint wasn't decoupled enough to unit test before 2.0 and I've spent all my time cramming functionality in there. Unit tests are on the todo list (And I'm working on TravisCI setup in my personal repo) but I expect 2.0 to ship before coverage hits double digits.

DRSDavidSoft commented 7 years ago

Let's see how the 2.0 revision turns out before dealing with this. I can only ask that you keep an option for missing keys in your plans, so we could code a way around the hardness.

It's nice that there will be unit tests, it's a necessity in my opinion ;) May I suggest combining them with the examples? That's what a lot of repos do, for obvious reasons.

On a side note, I want to once again show my appreciation for your work. Kint is absolutely the first library/class that I include in my development codes when I use PHP.

May I ask that you share your TODO list so I can be of help towards Kint?

jnvsor commented 7 years ago

I can only ask that you keep an option for missing keys in your plans, so we could code a way around the hardness.

I spent a lot of time (Like... Half a year...) thinking up a flexible architecture. Worst case scenario you swap out the table plugin with your own version at runtime from your own code. It also means I don't have to feel guilty about turning down feature requests :smile:

On a side note, I want to once again show my appreciation for your work.

If you're still using Kint 1 then it's pretty much all @raveren. Do please leave me feedback on 2.x at #208 !

I'll update #208 with a todo list tomorrow

jnvsor commented 7 years ago

208 has the todo list and your PR is merged