{"id":13523745,"url":"https://github.com/bamarni/composition","last_synced_at":"2025-05-05T07:32:39.402Z","repository":{"id":4412543,"uuid":"5550104","full_name":"bamarni/composition","owner":"bamarni","description":"Check your Composer dependencies at runtime.","archived":false,"fork":false,"pushed_at":"2016-03-18T11:25:41.000Z","size":9,"stargazers_count":105,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-08T19:22:06.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bamarni.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}},"created_at":"2012-08-25T09:22:42.000Z","updated_at":"2025-02-16T04:06:06.000Z","dependencies_parsed_at":"2022-07-21T13:32:19.653Z","dependency_job_id":null,"html_url":"https://github.com/bamarni/composition","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fcomposition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fcomposition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fcomposition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bamarni%2Fcomposition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bamarni","download_url":"https://codeload.github.com/bamarni/composition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252458608,"owners_count":21751071,"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-08-01T06:01:03.342Z","updated_at":"2025-05-05T07:32:39.163Z","avatar_url":"https://github.com/bamarni.png","language":"PHP","funding_links":[],"categories":["Dependency Management Extras","其他的依赖管理","Package Management Related","Package Management Extras","其他的依赖管理 Dependency Management Extras","Plugins"],"sub_categories":["Support"],"readme":"# Composition [![Build Status](https://secure.travis-ci.org/composition/composition.png)](https://secure.travis-ci.org/composition/composition)\n\nComposition provides a lightweight and generic API, that you can use to check your\nenvironment at runtime, instead of manually go checking for regex in constants,\nclasses/functions existence, matching a version against a class constant, ...\n\nIt only works when using Composer as package management tool.\n\n## Some examples\n\nA single command to check your PHP environment :\n``` php\nif (!\\Composition::has('vendor/super-package', '\u003e=2.0') {\n    $this-\u003emarkTestSkipped('The following tests require \"SuperPackage\" to be at least at 2.0');\n}\n\n\\Composition::has('php', '5.4.*');\n\\Composition::has('ext-mongo');\n```\n\nCheck the platform :\n``` php\nif (\\Composition::isWindows()) {\n// ...\n}\n```\n\n## Note\n\nThis tool should mostly be used in your unit tests, and not be abused in production.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamarni%2Fcomposition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbamarni%2Fcomposition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbamarni%2Fcomposition/lists"}