{"action":"created","issue":{"url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/25","labels_url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/25/comments","events_url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/25/events","html_url":"https://github.com/10gen-labs/mongo-php-library-prototype/issues/25","id":102703735,"number":25,"title":"MongoClient vs MongoDB backward compatibility issues","user":{"login":"dmifedorenko","id":1930019,"avatar_url":"https://avatars.githubusercontent.com/u/1930019?v=3","gravatar_id":"","url":"https://api.github.com/users/dmifedorenko","html_url":"https://github.com/dmifedorenko","followers_url":"https://api.github.com/users/dmifedorenko/followers","following_url":"https://api.github.com/users/dmifedorenko/following{/other_user}","gists_url":"https://api.github.com/users/dmifedorenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dmifedorenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmifedorenko/subscriptions","organizations_url":"https://api.github.com/users/dmifedorenko/orgs","repos_url":"https://api.github.com/users/dmifedorenko/repos","events_url":"https://api.github.com/users/dmifedorenko/events{/privacy}","received_events_url":"https://api.github.com/users/dmifedorenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jmikola","id":244663,"avatar_url":"https://avatars.githubusercontent.com/u/244663?v=3","gravatar_id":"","url":"https://api.github.com/users/jmikola","html_url":"https://github.com/jmikola","followers_url":"https://api.github.com/users/jmikola/followers","following_url":"https://api.github.com/users/jmikola/following{/other_user}","gists_url":"https://api.github.com/users/jmikola/gists{/gist_id}","starred_url":"https://api.github.com/users/jmikola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmikola/subscriptions","organizations_url":"https://api.github.com/users/jmikola/orgs","repos_url":"https://api.github.com/users/jmikola/repos","events_url":"https://api.github.com/users/jmikola/events{/privacy}","received_events_url":"https://api.github.com/users/jmikola/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-08-24T04:29:21Z","updated_at":"2015-09-02T04:30:35Z","closed_at":null,"body":"Hello.\r\n\r\nI tried migrate from MongoClient to MongoDB and that was quite hard. Issues I'll found:\r\n1. MongoDB\\Collection has no method to set read preference, we cant use constructor instead because of our private factory. Old MongoClient had setReadPreference, can you return it?\r\n2. MongoDB\\Collection has no \"limit\" method like old MongoClient does, can you return it?\r\n3. findOne(['_id' => $id]) call returns item without \"_id\" property, it is empty (null). Can you fix it?"},"comment":{"url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/comments/136934839","html_url":"https://github.com/10gen-labs/mongo-php-library-prototype/issues/25#issuecomment-136934839","issue_url":"https://api.github.com/repos/10gen-labs/mongo-php-library-prototype/issues/25","id":136934839,"user":{"login":"bjori","id":72407,"avatar_url":"https://avatars.githubusercontent.com/u/72407?v=3","gravatar_id":"","url":"https://api.github.com/users/bjori","html_url":"https://github.com/bjori","followers_url":"https://api.github.com/users/bjori/followers","following_url":"https://api.github.com/users/bjori/following{/other_user}","gists_url":"https://api.github.com/users/bjori/gists{/gist_id}","starred_url":"https://api.github.com/users/bjori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjori/subscriptions","organizations_url":"https://api.github.com/users/bjori/orgs","repos_url":"https://api.github.com/users/bjori/repos","events_url":"https://api.github.com/users/bjori/events{/privacy}","received_events_url":"https://api.github.com/users/bjori/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T04:30:35Z","updated_at":"2015-09-02T04:30:35Z","body":"That backtrace is failing in [error_get_last()](http://php.net/error_get_last), not pecl/mongodb.\r\nYou may want to try disable xdebug and see if that changes anything.\r\n\r\nIf that still crashes, try this for me:\r\n```\r\n$ wget -O gdbinit \"http://git.php.net/?p=php-src.git;a=blob_plain;f=.gdbinit;hb=refs/heads/PHP-5.6\"\r\n$ sudo gdb /usr/sbin/apache2 /tmp/core\r\n(gdb) source gdbinit\r\n(gdb) set print array on\r\n(gdb) set print object on\r\n(gdb) set print symbol-filename on\r\n(gdb) set print pretty on\r\n(gdb) set height 0\r\n(gdb) bt full\r\n(gdb) frame 2\r\n(gdb) l\r\n(gdb) printzv arg\r\n(gdb) zbacktrace\r\n```\r\n"}}