{"id":36971674,"url":"https://github.com/chubbyphp-legacy/chubbyphp-config","last_synced_at":"2026-01-13T21:54:32.577Z","repository":{"id":56952663,"uuid":"145460547","full_name":"chubbyphp-legacy/chubbyphp-config","owner":"chubbyphp-legacy","description":"A simple config.","archived":true,"fork":false,"pushed_at":"2020-09-26T06:22:32.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T14:48:56.860Z","etag":null,"topics":["chubbyphp-container","config","extendable","php","pimple"],"latest_commit_sha":null,"homepage":null,"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/chubbyphp-legacy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-20T19:18:06.000Z","updated_at":"2023-01-28T12:37:40.000Z","dependencies_parsed_at":"2022-08-21T08:20:27.551Z","dependency_job_id":null,"html_url":"https://github.com/chubbyphp-legacy/chubbyphp-config","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/chubbyphp-legacy/chubbyphp-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chubbyphp-legacy","download_url":"https://codeload.github.com/chubbyphp-legacy/chubbyphp-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["chubbyphp-container","config","extendable","php","pimple"],"created_at":"2026-01-13T21:54:31.779Z","updated_at":"2026-01-13T21:54:32.572Z","avatar_url":"https://github.com/chubbyphp-legacy.png","language":"PHP","readme":"# chubbyphp-config\n\n[![Build Status](https://api.travis-ci.org/chubbyphp/chubbyphp-config.png?branch=master)](https://travis-ci.org/chubbyphp/chubbyphp-config)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-config/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-config?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-config/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-config)\n[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-config/downloads.png)](https://packagist.org/packages/chubbyphp/chubbyphp-config)\n[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-config/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-config)\n[![Daily Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-config/d/daily)](https://packagist.org/packages/chubbyphp/chubbyphp-config)\n\n## Description\n\nA simple config.\n\nDEPRECATED: I suggest to use [chubbyphp-laminas-config][3] with or without config stuff from [laminas][4].\n\n## Requirements\n\n * php: ^7.2\n\n## Suggest\n\n * chubbyphp/chubbyphp-container: ^1.0\n * pimple/pimple: ^3.2.3\n * symfony/console: ^2.8.50|^3.4.26|^4.2.7|^5.0\n\n## Installation\n\nThrough [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-config][1].\n\n```bash\ncomposer require chubbyphp/chubbyphp-config \"^2.1\"\n```\n\n## Usage\n\n### Command\n\n * [CleanDirectoriesCommand][2]\n\n### Bootstrap\n\n#### ServiceFactory (chubbyphp/chubbyphp-container)\n\n```php\n\u003c?php\n\nnamespace MyProject;\n\nuse Chubbyphp\\Config\\ConfigProvider;\nuse Chubbyphp\\Config\\ServiceFactory\\ConfigServiceFactory;\nuse Chubbyphp\\Container\\Container;\nuse MyProject\\Config\\DevConfig;\nuse MyProject\\Config\\ProdConfig;\n\n$env = 'dev';\n\n$container = new Container();\n$container-\u003efactories((new ConfigServiceFactory((new ConfigProvider([\n    new DevConfig(__DIR__.'/..'),\n    new ProdConfig(__DIR__.'/..'),\n]))-\u003eget($env)))());\n```\n\n#### ServiceProvider (pimple/pimple)\n\n```php\n\u003c?php\n\nnamespace MyProject;\n\nuse Chubbyphp\\Config\\ConfigProvider;\nuse Chubbyphp\\Config\\ServiceProvider\\ConfigServiceProvider;\nuse MyProject\\Config\\DevConfig;\nuse MyProject\\Config\\ProdConfig;\nuse Pimple\\Container;\n\n$env = 'dev';\n\n$container = new Container();\n$container-\u003eregister(new ConfigServiceProvider(\n    (new ConfigProvider([\n        new DevConfig(__DIR__.'/..'),\n        new ProdConfig(__DIR__.'/..'),\n    ]))-\u003eget($env)\n));\n```\n\n### Config\n\n```php\n\u003c?php\n\nnamespace MyProject\\Config;\n\nuse Chubbyphp\\Config\\ConfigInterface;\n\nclass DevConfig implements ConfigInterface\n{\n    /**\n     * @var string\n     */\n    private $rootDir;\n\n    /**\n     * @param string $rootDir\n     */\n    public function __construct(string $rootDir)\n    {\n        $this-\u003erootDir = $rootDir;\n    }\n\n    /**\n     * @return array\n     */\n    public function getConfig(): array\n    {\n        return [\n            'env' =\u003e $this-\u003egetEnv(),\n            'rootDir' =\u003e $this-\u003erootDir\n        ];\n    }\n\n    /**\n     * @return array\n     */\n    public function getDirectories(): array\n    {\n        $environment = $this-\u003egetEnv();\n\n        return [\n            'cache' =\u003e $this-\u003erootDir . '/var/cache/' . $environment,\n            'logs' =\u003e $this-\u003erootDir . '/var/logs/' . $environment,\n        ];\n    }\n\n    public function getEnv(): string\n    {\n        return 'dev';\n    }\n}\n```\n\n## Copyright\n\nDominik Zogg 2020\n\n[1]: https://packagist.org/packages/chubbyphp/chubbyphp-config\n[2]: doc/Command/CleanDirectoriesCommand.md\n[3]: https://packagist.org/packages/chubbyphp/chubbyphp-laminas-config\n[4]: https://github.com/laminas?q=config\u0026type=\u0026language=php\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-config/lists"}