{"id":18929749,"url":"https://github.com/thecodingmachine/composite-container-factory","last_synced_at":"2025-10-26T16:42:21.729Z","repository":{"id":66284939,"uuid":"47989507","full_name":"thecodingmachine/composite-container-factory","owner":"thecodingmachine","description":"This package provides a factory creating a composite container that automatically detects compatible containers using container-discovery and Puli.","archived":false,"fork":false,"pushed_at":"2015-12-14T17:50:28.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"1.0","last_synced_at":"2025-10-20T06:24:41.769Z","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/thecodingmachine.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":"2015-12-14T17:09:58.000Z","updated_at":"2015-12-14T17:10:18.000Z","dependencies_parsed_at":"2023-03-23T11:35:16.062Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/composite-container-factory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/composite-container-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fcomposite-container-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fcomposite-container-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fcomposite-container-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fcomposite-container-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/composite-container-factory/tar.gz/refs/heads/1.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fcomposite-container-factory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281139048,"owners_count":26450136,"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-10-26T02:00:06.575Z","response_time":61,"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":"2024-11-08T11:34:52.637Z","updated_at":"2025-10-26T16:42:21.709Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Composite container factory\n===========================\n\nThis package provides a factory creating a composite container that automatically detects compatible containers using container-discovery and Puli.\n\nUsage\n-----\n\n```php\nuse TheCodingMachine\\CompositeContainer\\CompositeContainerFactory;\n\n$compositeContainer = CompositeContainerFactory::get();\n```\n\nThe `get` method will:\n\n- initialize Puli\n- create a composite container\n- using Puli, discover all containers that are compatible with [container-discovery](https://github.com/thecodingmachine/container-discovery)\n- instantiate all the containers and add them to the composite container\n- finally, add Puli instances to the composite container\n\nSo the composite container contains all entries of aggregated containers.\n\nThe Composite container is of course compatible with container-interop, so you can use `get` and `has` method to fetch services.\n\n**Important**: The `CompositeContainerFactory::get()` method should be called **only once** in your script. Two successive calls will NOT return the same instance.\n\nPuli entries\n------------\n\nThose 4 entries will be added to the composite container:\n\n- `puli.factory`: The Puli factory\n- `puli.repository`: The Puli repository\n- `puli.discovery`: The Puli discovery component\n- `puli.asset_url_generator`: The Puli URL generator\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fcomposite-container-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fcomposite-container-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fcomposite-container-factory/lists"}