Error in group aggregation builder
Error in group aggregation builder

After spending some hours trying to figure out why I had the error "can't convert from BSON type string to Date" I founded that there is an error in the doc
"->month('purchaseDate')" and "->year('purchaseDate')" instead of "->month('$purchaseDate')" and "->year('$purchaseDate')"
alcaeus/mongodb-odm,malarzm/mongodb-odm,malarzm/mongodb-odm,doctrine/mongodb-odm,doctrine/mongodb-odm,alcaeus/mongodb-odm