vortex-php / config
A simple config library to managing application config variables
dev-main
2025-11-20 07:45 UTC
Requires
- php: >=8.1
Requires (Dev)
- laravel/pint: ^1.20
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
This package is not auto-updated.
Last update: 2026-03-27 07:48:14 UTC
README
A lightweight PHP configuration library for PHP, JSON, YAML, and .env files, supporting nested keys, strict mode, and memory-resident usage.
Designed to be Swoole-friendly for long-running processes.
Features
- Load configuration from PHP, JSON, YAML, and
.envfiles - Supports nested keys (
database.connections.mysql.host) - Strict mode to throw exceptions on missing keys
- Memory-resident, safe for Swoole long-running processes
- PSR-12 / PHP 8.1+ ready
- Lightweight and framework-agnostic
Requirements
- PHP 8.1 or higher
- Optional extensions:
ext-yamlfor YAML supportext-jsonfor JSON support
Installation
Install via Composer:
composer require vortex-php/config