{"id":29874587,"url":"https://github.com/phpexpertsinc/composer-constraints-parser-human","last_synced_at":"2025-07-31T00:42:49.092Z","repository":{"id":299037788,"uuid":"995934596","full_name":"PHPExpertsInc/composer-constraints-parser-human","owner":"PHPExpertsInc","description":"A human-only implementation of Composer's version constraints parser.","archived":false,"fork":false,"pushed_at":"2025-06-14T08:57:29.000Z","size":240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2025-06-14T09:36:36.922Z","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/PHPExpertsInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2025-06-04T08:09:10.000Z","updated_at":"2025-06-14T08:57:32.000Z","dependencies_parsed_at":"2025-06-14T09:36:42.030Z","dependency_job_id":"d97a93da-07c6-45e6-b150-3bc73338a451","html_url":"https://github.com/PHPExpertsInc/composer-constraints-parser-human","commit_stats":null,"previous_names":["phpexpertsinc/composer-constraints-parser-human"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PHPExpertsInc/composer-constraints-parser-human","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fcomposer-constraints-parser-human","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fcomposer-constraints-parser-human/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fcomposer-constraints-parser-human/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fcomposer-constraints-parser-human/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHPExpertsInc","download_url":"https://codeload.github.com/PHPExpertsInc/composer-constraints-parser-human/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPExpertsInc%2Fcomposer-constraints-parser-human/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267967822,"owners_count":24173579,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-07-31T00:42:47.703Z","updated_at":"2025-07-31T00:42:49.076Z","avatar_url":"https://github.com/PHPExpertsInc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Composer Constraints Parser\n\nComposer Constraints Parser is a PHP Experts, Inc., Project that is a clean-room implementation of Packagist's\ncomposer's version constraint system.\n\nIt is meant as a zero-dependency option to faithfully interpret whether any particular version number is satisfiable\nby a composer verison constraint.\n\nThis project contains 100% of all of the in-the-world composer version constraints of every dependency of every package\nin the entire packagist.org database. These can be found in [tests/constraints.json].\n\nThere are 155,623 test assertions testing all 48,209 in-the-wild composer version constraints and has 100% fidelity.\nIt is current as of 2025-04-01.\n\nThis is possible because of the Bettergist Collector API, which archives every PHP packagist package weekly and does\ndeep analysis of them quarterly.\n\n## Project Requirements\n\nThis is primarily a scientific research project and the code will be part of a scientific study.\n\nYou are allowed only two documents and one website to solve this problem:\n\n1. [**The official Composer Versions and Constraints documentation**](https://getcomposer.org/doc/articles/versions.md)\n2. [**How Composer Version Constraints Work**](https://www.iwader.co.uk/posts/2016/02/how-composer-version-constraints-work/)\n3. [**The PHP.net manual**](https://www.php.net/docs.php)\n\nAbsolutely no LLMs should be consulted for this project. No ChatGPT, nothing. This needs to be a 100% human endeavor.\n\nRequirements:\n\n1. Clean-room implementation: Absolutely do not look at any other source code or projects. Use your own knowledge\nand the existing documentation.\n2. 100% passing every single one of the 155,319 PHP unit test assertions.\n3. You almost certainly must have Xdebug configured for command line debugging or this project will not be feasible.\n4. The Unit tests contain Composer's version matching code itself, which you can use to test your own code.\nIt is in `isValidVersionConstraint`.\n5. Absolutely under no circumstance may you look at or analyze Composer source code. This would be a breach of ethics\nin this case. If it is done accidentally, please report to your manager immediately do not code further.\n6. All of your work and research should be screen-recorded and stored as H264 with no audio and uploaded to a mega.nz\naccount.\n7. Please attempt to do `git commits` at every possible stopping point, with descriptive commit messages. While not\nessential, this will aid in the scientific research.\n\n## Installation\n\nVia Composer\n\n```bash\ncomposer install\n```\n\n## Usage\n\n```php\nuse PHPExperts\\ComposerVersionConstraints\\ComposerConstraintsHelper;\n\n$satisfies = ComposerConstraintsHelper::versionSatisfies('7.4', '^7.4|^8.0');\n// true\n```\n\n## Use cases\n\n ✔ Can determine if a constraint is valid  \n ✔ Complex composer constraints  \n ✔ All composer constraints  \n ✔ Known constraint  \n\n## Testing\n\n```bash\nphpunit\n```\n\n## Contributors\n\n[Theodore R. Smith](https://www.phpexperts.pro/]) \u003ctheodore@phpexperts.pro\u003e  \nGPG Fingerprint: 4BF8 2613 1C34 87AC D28F  2AD8 EB24 A91D D612 5690  \nCEO: PHP Experts, Inc.\n\n## License\n\nMIT license. Please see the [license file](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpexpertsinc%2Fcomposer-constraints-parser-human","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpexpertsinc%2Fcomposer-constraints-parser-human","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpexpertsinc%2Fcomposer-constraints-parser-human/lists"}