{"id":15296398,"url":"https://github.com/ellisgl/geeklab-conf","last_synced_at":"2026-02-18T00:02:47.270Z","repository":{"id":45954601,"uuid":"158491967","full_name":"ellisgl/GeekLab-Conf","owner":"ellisgl","description":"Configuration system for PHP \u003e= 8.1","archived":false,"fork":false,"pushed_at":"2022-11-24T21:39:52.000Z","size":406,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"release","last_synced_at":"2025-06-05T06:53:16.852Z","etag":null,"topics":["array","configuration","environment","ini","json","php","php7","php7-4","php74","php81","yaml"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ellisgl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.BSD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-21T04:44:36.000Z","updated_at":"2022-11-24T17:12:48.000Z","dependencies_parsed_at":"2023-01-23T11:15:13.323Z","dependency_job_id":null,"html_url":"https://github.com/ellisgl/GeekLab-Conf","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ellisgl/GeekLab-Conf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-Conf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-Conf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-Conf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-Conf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellisgl","download_url":"https://codeload.github.com/ellisgl/GeekLab-Conf/tar.gz/refs/heads/release","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellisgl%2FGeekLab-Conf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006452,"owners_count":26084107,"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-11T02:00:06.511Z","response_time":55,"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":["array","configuration","environment","ini","json","php","php7","php7-4","php74","php81","yaml"],"created_at":"2024-09-30T18:10:21.944Z","updated_at":"2025-10-11T06:39:04.075Z","avatar_url":"https://github.com/ellisgl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: BSD](https://img.shields.io/badge/License-BSD-yellow.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![phpstan enabled](https://img.shields.io/badge/phpstan-enabled-green.svg)](https://github.com/phpstan/phpstan)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ellisgl/GeekLab-Conf/badges/quality-score.png?b=release)](https://scrutinizer-ci.com/g/ellisgl/GeekLab-Conf/?branch=release)\n[![Code Coverage](https://scrutinizer-ci.com/g/ellisgl/GeekLab-Conf/badges/coverage.png?b=release)](https://scrutinizer-ci.com/g/ellisgl/GeekLab-Conf/?branch=release)\n\n# geeklab/conf\nImmutable configuration system loader \u0026 parser for PHP \u003e= 8.1 that supports multiple file formats and has some templating features.\nThis library is an alternative to '.env' type configuration libraries and uses the [Strategy Pattern](https://designpatternsphp.readthedocs.io/en/latest/Behavioral/Strategy/README.html). \n\n### [Benchmarks](https://github.com/ellisgl/php-benchmarks/blob/master/results/Confs.md)\n\n## Latest\n4.0.0 (2020-11-24): Updating to more \u003e= 8.1.0 compatible.\n\n## Features:\n* Multi-file configuration loading, no more monolithic configurations!\n* Self referencing placeholders. ```@[X.Y.Z]```\n* Recursive self referencing placeholders. ```@[@[X.Y.Z].SOME_KEY]```\n* Environment variable placeholders. ```$[ENVIRONMENT_VARIABLE_NAME]``` (PHP likes ```${YOUR_TEXT_HERE}``` a little too much...)\n* Can use INI, JSON, YAML and Array files.\n* Immutability, since you shouldn't change your configuration during run time.\n* Can inject values, to make things really dynamic.\n\n## Installation:\ncomposer require geeklab/conf\n\n## Usage:\nBasic:\n```PHP\n// Where the configurations are.\n$configurationDirectory = __DIR__ . '/config/';\n\n// Load Configuration system with the JSON Configuration Driver \n$configuration = new GLConf(\n    new JSONConfDriver(\n        $configurationDirectory . 'system.json',  // Path and file name of main (top level) configuration.\n        $configurationDirectory                   // Path to the other configuration files. \n    ),\n    ['mySecretKey' =\u003e md5(rand())],                // Value injections.\n    ['keys_to_lower']                              // Options:\n                                                   //  Options to change the case of the key if returning a keyed array:    \n                                                   //  keys_upper_case, keys_lower_case, keys_same_case\n);\n\n$configuration-\u003einit();\n\n// Get the whole configuration.\nvar_export($configuration-\u003egetAll());\n\n// Get one item.\nvar_export($configuration-\u003eget('space_pants.look_at_my'));\n```\n\nDetailed:\n* [INI](/docs/INI.md)\n* [Array](/docs/Array.md)\n* [JSON](/docs/JSON.md)\n* [YAML](/docs/YAML.md)\n\nPSR Compliance:\n* PSR-1\n* PSR-2\n* PSR-4\n* PSR-12\n\n## Todo:\n* More Documentation.\n* Include .env?\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellisgl%2Fgeeklab-conf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellisgl%2Fgeeklab-conf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellisgl%2Fgeeklab-conf/lists"}