Release Candidate 4
Release Notes for 1.0.0-RC.4
The fourth release candidate of JG\Config focuses on performance optimizations, refined logic, and robust new features, solidifying its role as a high-performance, extensible PHP configuration library. With key improvements to caching, configuration management, and handling deeply nested configurations, this release ensures both stability and flexibility for developers.
What's New in 1.0.0-RC.4?
- Performance Optimizations:
- Optimized the
flattenArray
andload
methods for improved efficiency when handling deeply nested configurations. - Streamlined caching operations for faster load times and reduced overhead.
- Optimized the
- Depth Limiting for Nested Configurations:
- Introduced a
maxDepth
property to enforce safe handling of deeply nested configurations, preventing performance issues.
- Introduced a
- Enhanced Caching System:
- Added
saveCache
,loadCache
, anddeleteCache
methods for robust caching capabilities. - Ensures faster access to configurations with built-in expiration handling.
isCacheLoaded
method verifies if a valid cache has been successfully loaded.
- Added
- Comprehensive Retrieval Methods:
- Added
getAll
to return the entire configuration array. - Added
getGroups
to retrieve all configuration groups for easier introspection.
- Added
- Refinements in Logic:
- Improved
add
anddelete
methods to handle grouped configurations with better precision. - Updated
load
method to leverage caching and ensure consistency during file loads.
- Improved
Key Features
- Supported Formats:
- CONF, INI, JSON, XML, YAML/YML, and PHP arrays.
- Custom Parsers:
- Extend functionality by adding support for additional formats through a flexible parser system.
- Advanced Caching:
- Save and load configurations with expiration support for efficient and reusable setups.
- Comprehensive API:
- Load configurations from files or directories.
- Retrieve, add, update, and delete configuration values.
- Support for both grouped and flattened keys with intuitive handling.
- Error Handling:
- Custom exceptions (
ConfigException
,ConfigParseException
,InvalidParserException
) for better debugging and runtime safety.
- Custom exceptions (
- Reliability:
- Fully tested with PHPUnit to ensure robust and predictable behavior.
Installation
Install via Composer:
composer require jamesgober/config
Documentation
Dive into the Full Documentation to explore:
- Usage examples for loading and managing configurations.
- Advanced techniques for leveraging grouped and flattened keys.
- Contribution and customization guides.
Changelog
For the detailed list of updates, refer to the CHANGELOG.
Feedback and Contributions
Your feedback helps shape JG\Config! Report issues or suggest improvements on the GitHub Issues page. Contributions are always welcome—review the contribution guidelines in the repository.