aggregation pipeline. Match parameter types
Guuzen opened this issue · 2 comments
Guuzen commented
PHPDoc comment in match:
@param array|\Sokil\Mongo\Expression $expression
But when i trying to use \Sokil\Mongo\Expression like this:
$expression = (new Sokil\Mongo\Expression())->where('field', 1);
$result = $collection->createAggregator()
->match($expression)
->aggregate();
i get error:
Fatal error: Uncaught exception 'Sokil\Mongo\Exception' with message 'Must be array or instance of Expression' in /var/www/html/vendor/sokil/php-mongo/src/Pipeline.php on line 66
Sokil\Mongo\Exception: Must be array or instance of Expression in /var/www/html/vendor/sokil/php-mongo/src/Pipeline.php on line 66
sokil commented
reproduced. will be fixed soon
sokil commented
fixed