{"id":36398725,"url":"https://github.com/thesebas/php-mongodb-helpers","last_synced_at":"2026-01-11T16:01:39.444Z","repository":{"id":57068527,"uuid":"84935241","full_name":"thesebas/php-mongodb-helpers","owner":"thesebas","description":"MongoDB php helpers to build queries","archived":false,"fork":false,"pushed_at":"2018-08-23T09:36:36.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-13T12:40:08.269Z","etag":null,"topics":["mongodb","php","query-builder"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesebas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-14T10:17:45.000Z","updated_at":"2017-08-14T21:30:22.000Z","dependencies_parsed_at":"2022-08-24T14:54:11.879Z","dependency_job_id":null,"html_url":"https://github.com/thesebas/php-mongodb-helpers","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/thesebas/php-mongodb-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesebas%2Fphp-mongodb-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesebas%2Fphp-mongodb-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesebas%2Fphp-mongodb-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesebas%2Fphp-mongodb-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesebas","download_url":"https://codeload.github.com/thesebas/php-mongodb-helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesebas%2Fphp-mongodb-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","php","query-builder"],"created_at":"2026-01-11T16:01:01.139Z","updated_at":"2026-01-11T16:01:39.382Z","avatar_url":"https://github.com/thesebas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-mongodb-helpers\nMongoDB php helpers to build queries. ![BUILD STATUS](https://api.travis-ci.org/thesebas/php-mongodb-helpers.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/thesebas/php-mongodb-helpers/badge.svg)](https://coveralls.io/github/thesebas/php-mongodb-helpers)\n\nWrite this:\n```php\n$collection-\u003eaggregate([\n\n  project([\n      'field' =\u003e reduce(\n          filter(\n              path(...$arrayField),\n              'tmp',\n              eq(variable(\"tmp\", ...$filterField), $filterValue)\n          ),\n          0,\n          add(variable('value'), variable(\"this\", $sumField))\n      )\n  ])\n\n]);\n```\n\ninstead of this:\n```php\n$collection-\u003eaggregate([\n  ['$project' =\u003e [\n      'field' =\u003e ['$reduce' =\u003e [\n          'input' =\u003e ['$filter' =\u003e [\n              'input' =\u003e '$' . join('.', $arrayField),\n              'as' =\u003e 'tmp',\n              'cond' =\u003e ['$eq' =\u003e [\"\\$\\$tmp.\" . join('.', $filterField), $filterValue]]\n          ]],\n          'initialValue' =\u003e 0,\n          'in' =\u003e [\n              '$add' =\u003e ['$$value', '$$this.' . $sumField]\n          ]\n      ]]\n  ]]\n]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesebas%2Fphp-mongodb-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesebas%2Fphp-mongodb-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesebas%2Fphp-mongodb-helpers/lists"}