{"id":18285501,"url":"https://github.com/bemit/satellite-config","last_synced_at":"2025-04-09T06:16:51.868Z","repository":{"id":62550445,"uuid":"498876905","full_name":"bemit/satellite-config","owner":"bemit","description":"Simple config aggregator with caching.","archived":false,"fork":false,"pushed_at":"2022-10-20T18:25:14.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T00:32:56.566Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bemit.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":"2022-06-01T19:45:12.000Z","updated_at":"2022-06-01T23:20:27.000Z","dependencies_parsed_at":"2022-11-03T01:45:58.654Z","dependency_job_id":null,"html_url":"https://github.com/bemit/satellite-config","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bemit","download_url":"https://codeload.github.com/bemit/satellite-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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-11-05T13:16:52.922Z","updated_at":"2025-04-09T06:16:51.848Z","avatar_url":"https://github.com/bemit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orbiter\\Satellite Config\n\n[![Latest Stable Version](https://poser.pugx.org/orbiter/satellite-config/version.svg)](https://packagist.org/packages/orbiter/satellite-config)\n[![Latest Unstable Version](https://poser.pugx.org/orbiter/satellite-config/v/unstable.svg)](https://packagist.org/packages/orbiter/satellite-config)\n[![codecov](https://codecov.io/gh/bemit/satellite-config/branch/main/graph/badge.svg?token=9BopoWmdHw)](https://codecov.io/gh/bemit/satellite-config)\n[![Total Downloads](https://poser.pugx.org/orbiter/satellite-config/downloads.svg)](https://packagist.org/packages/orbiter/satellite-config)\n[![Github actions Build](https://github.com/bemit/satellite-config/actions/workflows/blank.yml/badge.svg)](https://github.com/bemit/satellite-config/actions)\n[![PHP Version Require](http://poser.pugx.org/orbiter/satellite-config/require/php)](https://packagist.org/packages/orbiter/satellite-config)\n\n- simple config aggregator with caching\n\nCheck [satellite-app](https://github.com/bemit/satellite-app) for a ready to use template, or install just this library:\n\n```shell\ncomposer require orbiter/satellite-config\n```\n\n- [ConfigProvider](./tests/mock/ConfigProvider.php) implementing `Satellite\\Config\\ConfigProviderInterface`\n- [ConfigInvokableProvider](./tests/mock/ConfigInvokableProvider.php) using `__invoke(): array`\n\n```php\n$aggregator = new \\Satellite\\Config\\ConfigAggregator($is_prod ? __DIR__ . '/tmp/config_aggregated.php' : null);\n$aggregator-\u003eappend( \n    ConfigProvider::class,\n    ConfigInvokableProvider::class,\n    // pass down functions which return an array (when using cache: only executed on warm-up)\n    static fn() =\u003e [\n        'some_array' =\u003e [\n            'a' =\u003e [],\n        ],\n    ],\n    // pass down arrays:\n    [\n        'some_array' =\u003e [\n            'b' =\u003e [],\n            // functions can also be used nested (when using cache: only executed on warm-up)\n            'c' =\u003e static fn() =\u003e [],\n        ]\n    ],\n);\n// just aggregate:\n$config = $aggregator-\u003emake();\n// aggregate and use cache (if configured):\n$config = $aggregator-\u003econfigure();\n```\n\n## Dev Notices\n\nCommands to set up and run e.g. tests:\n\n```bash\n# on windows:\ndocker run -it --rm -v %cd%:/app composer install\n\ndocker run -it --rm -v %cd%:/var/www/html php:8.1-cli-alpine sh\n\ndocker run --rm -v %cd%:/var/www/html php:8.1-cli-alpine sh -c \"cd /var/www/html \u0026\u0026 ./vendor/bin/phpunit --testdox -c phpunit-ci.xml --bootstrap vendor/autoload.php\"\n\n# on unix:\ndocker run -it --rm -v `pwd`:/app composer install\n\ndocker run -it --rm -v `pwd`:/var/www/html php:8.1-cli-alpine sh\n\ndocker run --rm -v `pwd`:/var/www/html php:8.1-cli-alpine sh -c \"cd /var/www/html \u0026\u0026 ./vendor/bin/phpunit --testdox -c phpunit-ci.xml --bootstrap vendor/autoload.php\"\n```\n\n## Versions\n\nThis project adheres to [semver](https://semver.org/), **until `1.0.0`** and beginning with `0.1.0`: all `0.x.0` releases are like MAJOR releases and all `0.0.x` like MINOR or PATCH, modules below `0.1.0` should be considered experimental.\n\n## License\n\nThis project is free software distributed under the [**MIT LICENSE**](LICENSE).\n\n### Contributors\n\nBy committing your code to the code repository you agree to release the code under the MIT License attached to the repository.\n\n***\n\nMaintained by [Michael Becker](https://i-am-digital.eu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemit%2Fsatellite-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite-config/lists"}