{"action":"created","issue":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/184","labels_url":"https://api.github.com/repos/bobthecow/psysh/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/bobthecow/psysh/issues/184/comments","events_url":"https://api.github.com/repos/bobthecow/psysh/issues/184/events","html_url":"https://github.com/bobthecow/psysh/pull/184","id":63412958,"number":184,"title":"Use VarDumper as Presenter","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-21T14:42:38Z","updated_at":"2015-06-06T21:53:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bobthecow/psysh/pulls/184","html_url":"https://github.com/bobthecow/psysh/pull/184","diff_url":"https://github.com/bobthecow/psysh/pull/184.diff","patch_url":"https://github.com/bobthecow/psysh/pull/184.patch"},"body":"Quite straightforward in fact! Could close #180\r\nThis gave me some ideas to enhance VarDumper that should be in the upcoming 2.7 version.\r\nI'll also add a caster for MongoCursor and we can then work together to enhance VarDumper to the benefit of both the PsySH and Symfony Components users.\r\nStill not interested? :)"},"comment":{"url":"https://api.github.com/repos/bobthecow/psysh/issues/comments/109653397","html_url":"https://github.com/bobthecow/psysh/pull/184#issuecomment-109653397","issue_url":"https://api.github.com/repos/bobthecow/psysh/issues/184","id":109653397,"user":{"login":"bobthecow","id":53660,"avatar_url":"https://avatars.githubusercontent.com/u/53660?v=3","gravatar_id":"","url":"https://api.github.com/users/bobthecow","html_url":"https://github.com/bobthecow","followers_url":"https://api.github.com/users/bobthecow/followers","following_url":"https://api.github.com/users/bobthecow/following{/other_user}","gists_url":"https://api.github.com/users/bobthecow/gists{/gist_id}","starred_url":"https://api.github.com/users/bobthecow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobthecow/subscriptions","organizations_url":"https://api.github.com/users/bobthecow/orgs","repos_url":"https://api.github.com/users/bobthecow/repos","events_url":"https://api.github.com/users/bobthecow/events{/privacy}","received_events_url":"https://api.github.com/users/bobthecow/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T21:53:40Z","updated_at":"2015-06-06T21:53:40Z","body":"@nicolas-grekas Thanks for putting so much work into this. It's looking really good. A few more feedbacks… I'm not sure if any of these belong in the \"psysh opinionated dumper\" code, as they'd make it inconsistent with the way VarDumper works everywhere else, so maybe they're improvements that can be made to VarDumper itself?\r\n\r\n1. In my opinion, the closer things are to standard PHP code, the easier it is to understand them at a glance, as it doesn't require (as much) context switching. As an example, it might make sense to use HEREDOC instead of triple quoted strings for multi-line string dumping. Other things are less cruicial, but also mismatched with standard PHP representations, like the `(string)` representation of a resource, which uses `#165` vs the VarDumper `@165` representation.\r\n\r\n2. On the same note, it feels weird for array elements not to be separated by commas. It would feel more consistent for object properties to have commas after them as well, but it seems like there's a valid case either way… with array elements, though, missing commas just seems wrong.\r\n\r\n3. VarDumper highlights _everything_, which feels like overkill. It would be easier to understand at a glance, for example, if `:`, `=>`, `[` and `{` were printed in the default terminal color, and if the quotes on strings were the same color as the string but unbolded.\r\n\r\n4. Per PEP-8 (the canonical python coding standard, and the community convention of the only language I'm familiar with that uses triple quoted strings) the start of the string is on the same line as the opening quotes, the lines in the middle are aligned with the start of both sets of triple quotes, and the quotes at the end are on their own line:\r\n\r\n   ```\r\n   \"\"\"this\r\n   is\r\n   a\r\n   triple\r\n   quoted\r\n   string\r\n   \"\"\"\r\n   ```\r\n\r\n   VarDumper does it exactly backwards of each of those rules :)\r\n\r\n   ```\r\n   \"\"\"\r\n      this\r\n      is\r\n      a\r\n      triple\r\n      quoted\r\n      string\"\"\"\r\n   ```\r\n"}}