Download the PHP package kislayphp/config without Composer
On this page you can find all versions of the php package kislayphp/config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kislayphp/config
More information about kislayphp/config
Files in kislayphp/config
Package config
Short Description High-performance C++ PHP extension providing dynamic configuration management for PHP microservices
License Apache-2.0
Homepage https://github.com/KislayPHP/config
Informations about the package config
KislayPHP Config
kislayphp/config is a centralized configuration service and runtime client for multi-node PHP services.
Phase 1 adds:
- standalone config server
- runtime client bootstrap with local cache support
- layered config resolution for environment, project, service, and node scopes
- local file, environment variable, and runtime overrides
This package is part of the KislayPHP ecosystem.
Installation
Enable the extension:
Quick Start
1. Start a config server
2. Load config inside a service
3. Add local overrides
Resolution Order
Config is merged in this order:
- global
- environment
- project
- service
- node
- local file override
- environment variable override
- runtime override
Environment variables use KISLAY_CFG_ by default.
Example:
Double underscore becomes . in the final config key.
Public API
Kislay\Config\Config
Kislay\Config\Server
Kislay\Config\ConfigClient
Compatibility client retained for simple in-memory or delegated use:
HTTP Endpoints
The standalone server exposes:
GET /healthGET /v1/config/versionGET /v1/config/resolve?environment=prod&project=commerce&service=order-service&node=order-1PUT /v1/config/globalPUT /v1/config/environments/{environment}PUT /v1/config/projects/{project}PUT /v1/config/projects/{project}/services/{service}PUT /v1/config/projects/{project}/services/{service}/nodes/{node}
PUT bodies accept JSON objects. Nested objects are flattened into dotted keys inside the runtime snapshot.
Production Notes
Current Phase 1 behavior:
- runtime refresh is explicit with
Config::refresh() cache_filestores the last successful remote snapshot- array values are stored as JSON and returned through
getArray() all()returns the resolved flat dotted-key map
Not in Phase 1 yet:
- background polling thread
- auth tokens / TLS
- config revision history / rollback API
- clustered config servers
Example
See /tmp/kislayphp_config_phase1/example.php for a minimal server/client walkthrough.
License
Apache License 2.0