{"id":19560441,"url":"https://github.com/codelytv/php-criteria","last_synced_at":"2025-08-28T19:06:57.068Z","repository":{"id":251882940,"uuid":"837203127","full_name":"CodelyTV/php-criteria","owner":"CodelyTV","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-10T08:56:13.000Z","size":117,"stargazers_count":73,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T00:07:56.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodelyTV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://bit.ly/CodelyTvPro"}},"created_at":"2024-08-02T12:37:54.000Z","updated_at":"2025-03-29T22:33:29.000Z","dependencies_parsed_at":"2024-08-06T10:41:46.450Z","dependency_job_id":null,"html_url":"https://github.com/CodelyTV/php-criteria","commit_stats":null,"previous_names":["codelytv/php-criteria"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fphp-criteria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fphp-criteria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fphp-criteria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodelyTV%2Fphp-criteria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodelyTV","download_url":"https://codeload.github.com/CodelyTV/php-criteria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143988,"owners_count":21054858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-11T05:07:33.881Z","updated_at":"2025-04-10T02:29:05.303Z","avatar_url":"https://github.com/CodelyTV.png","language":"PHP","funding_links":["https://bit.ly/CodelyTvPro"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://codely.com\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://codely.com/logo/codely_logo-dark.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://codely.com/logo/codely_logo-light.svg\"\u003e\n      \u003cimg alt=\"Codely logo\" src=\"https://codely.com/logo/codely_logo.svg\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\n  🎼 Criteria for PHP\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/CodelyTV\"\u003e\u003cimg src=\"https://img.shields.io/badge/Codely-OS-green.svg?style=flat-square\" alt=\"Codely Open Source projects\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://pro.codely.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Codely-Pro-black.svg?style=flat-square\" alt=\"Codely Pro courses\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 📥 Installation\n\nTo install the base criteria dependency, run the following command:\n```sh\ncomposer require codelytv/criteria\n```\n\nThen, install the preferred criteria transformer. You can transform in two directions:\n\nCreate a Criteria from:\n- [Laravel Request](./packages/criteria-from-laravel-request)\n- [Symfony Request](./packages/criteria-from-symfony-request)\n- [URL](./packages/criteria-from-url)\n\nConvert a Criteria to:\n- [Doctrine](./packages/criteria-to-doctrine)\n- [Elasticsearch](./packages/criteria-to-elasticsearch)\n- [Eloquent](./packages/criteria-to-eloquent)\n\nAlso, you can use Plug\u0026Play transformer for your preferred framework:\n- [Laravel](./packages/criteria-from-laravel-request-to-eloquent)\n\n### ✅ Testing\nTo facilitate the testing of the criteria, you can use the provided [object mothers](https://www.martinfowler.com/bliki/ObjectMother.html):\n\n```sh\ncomposer require codelytv/criteria-test-mother --dev\n```\n\n## ➕ Other implementations\nWe have [another implementation in TypeScript](https://github.com/CodelyTV/typescript-criteria) with converters for Next.js and URL. 🙌\n\n\n## ⬇️ Adding dependencies to packages\n\n* Don't add the dependency with the command `composer require`, but modify the `composer.json` file directly.\n* Don't touch the root `composer.json` file, but the `packages/*/composer.json` one.\n* After adding a new dependency, execute `vendor/bin/monorepo-builder merge \u0026\u0026 composer update` to add automatically the changes to the general `composer.json`.\n\n## 🚀 Release packages\n\nThis project is using [monorepo-builder](https://github.com/symplify/monorepo-builder) to manage the monorepo.\n\nTo release a new version you should execute:\n* `patch` version release: `make release-patch`\n* `minor` version release: `make release-minor`\n* `major` version release: `make release-major`\n\nThis will trigger a GitHub Workflow that would propagate the new version to all the packages in their own GitHub repos.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelytv%2Fphp-criteria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelytv%2Fphp-criteria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelytv%2Fphp-criteria/lists"}