Download the PHP package monkeyscloud/monkeyslegion-mlc without Composer
On this page you can find all versions of the php package monkeyscloud/monkeyslegion-mlc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download monkeyscloud/monkeyslegion-mlc
More information about monkeyscloud/monkeyslegion-mlc
Files in monkeyscloud/monkeyslegion-mlc
Package monkeyslegion-mlc
Short Description `.mlc` MonkeysLegion Config format parser & loader - Production-ready configuration management
License MIT
Informations about the package monkeyslegion-mlc
MonkeysLegion MLC - Configuration Engine
Production-grade .mlc configuration engine for PHP 8.4+. High-performance, zero-overhead, and enterprise-secure.
๐ Why MLC?
MLC is designed for one core task: parse once, serve from bytecode forever. It moves configuration beyond simple file loading into a high-performance system for modern PHP environments (RoadRunner, Swoole, or standard FPM).
- โก Zero-Overhead Production Mode: Compiles MLC to static PHP arrays for OPcache optimization.
- ๐ Deep Environment Integration: Native
${VAR:-default}expansion powered bymonkeyslegion-env. - ๐ Enterprise Security: Strict permission auditing, path traversal hardening, and circular reference detection.
- ๐ฏ Type-Safe DX: Typed getters (
getString,getInt, etc.) and a dual-layer mutation engine. - ๐ช Event-Driven: Lifecycle hooks (
onLoading,onLoaded) with type-safe enums and proxies. - ๐ Multi-Format Support: Native support for
.mlc,.json,.yaml, and.phparrays via a composite system.
๐ฆ Installation
๐ ๏ธ Basic Usage
Loading Configuration (Production-Ready)
To use the full power of MLC, you need to initialize the environment bootstrapper and the parser.
Accessing Values
โก Zero-Overhead Mode (OPcache)
In production, use the CompiledPhpCache to export your configuration to a static PHP file. This allows OPcache to store the configuration in shared memory.
๐ Dual-Layer Overrides
Apply non-destructive runtime overrides without touching the compiled base. Perfect for feature flags or multi-tenancy.
๐ช Component Extensions
The Loader emits lifecycle events that you can hook into for logging or metrics.
๐ Multi-Format Support
Use the CompositeParser to mix and match different configuration formats.
๐ MLC Syntax at a Glance
MLC provides a developer-friendly syntax that combines the best of INI, JSON, and PHP.
[!TIP] Visit SYNTAX.md for the full language specification.
๐ก๏ธ Security Features
- Path Traversal Prevention: Strict validation of all relative paths.
- Permission Auditing: In-depth check for world-writable files in production.
- Strict Mode:
strictSecurity: truethrows exceptions instead of warnings for insecure files. - Reference Tracking: Prevents circular key references and infinite inclusion loops.
๐ ๏ธ CLI Tool (mlc-check)
Validate your configuration files for syntax, security, and integrity from the terminal.
๐ Documentation
- MLC Syntax Reference
- Full Developer Documentation
- Multi-Format Support Guide
- Upgrading to v3.0.0
๐งช Testing
๐ License
The MIT License (MIT). Please see License File for more information.
All versions of monkeyslegion-mlc with dependencies
monkeyscloud/monkeyslegion-cache Version ^2.0
monkeyscloud/monkeyslegion-env Version ^1.0