I'm attempting to use the new mongodb aggregation framework from php.
I'm using mongod v2.2, php 5.3.13, and mongodb pecl library v1.3.0beta2 on OSX Mountain Lion
I'm stumbling right at the gates...
I've taken one of the examples from the php docs page and cut it down to...
$m = new Mongo;
$c = $m->selectDB("test")->selectCollection("zips");
$out = $c->aggregate(array('$group' => array('_id' => '$state')));
var_dump($out);
When I view the page I get an error on my mongod of...
Assertion 13111: :wrong type for field (pipeline) 3 != 4
I can't for the life of me see anything wrong with the code.
if I run db.zips.aggregate({$group : {'_id': "$state"}}) in the mongo console it works fine.