Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: commonphp/config

v0.2

16 Mar 00:43

Choose a tag to compare

Added

  • Initial release of comphp/config, a modular and extensible configuration management library.
  • Support for JSON and PHP configuration file parsing.
  • Dot-notation access for nested configuration values.
  • Merge strategies (Replace, Merge, Ignore, Error) for handling configuration overrides.
  • ParserRegistry for dynamic parser registration, supporting both prefix-based and suffix-based resolution.
  • Exception handling for missing files, invalid formats, and duplicate parsers.
  • PSR-11 compatibility with dependency injection container integration.
  • Unit tests covering core functionality.
  • Comprehensive documentation including examples and setup guide.

v0.1

17 Feb 17:59

Choose a tag to compare

We are excited to announce the release of version 0.1 of the CommonPHP Configuration Manager. This inaugural release introduces a flexible and powerful library designed to simplify configuration file management in PHP applications. Leveraging dynamic driver loading and customizable behaviors, it offers a robust solution for handling various configuration file formats and scenarios.

Features

  • Dynamic Driver Support: Load custom drivers to handle different configuration file formats, making the library extensible and adaptable to various project needs.
  • Behavior Customization: Define how the system reacts to duplicate file extensions and unsupported save operations, allowing for tailored behavior according to application requirements.
  • Comprehensive Exception Handling: Detailed exceptions provide clear insights into errors and issues, facilitating easier debugging and error management.
  • Attribute and Contract-Based Configuration: Utilize PHP attributes and interfaces for defining configuration drivers, ensuring a structured and organized approach to driver implementation.

Enhancements

  • Introduced ConfigurationManager for central management of configuration files and drivers.
  • Added ConfigurationDriverContract and ConfigurationDriverAttribute for defining configuration drivers.
  • Implemented customizable behaviors (DuplicateExtensionBehavior and ConfigurationCannotSaveBehavior) to handle duplicate extensions and save operation support.
  • Provided comprehensive exception handling with specific exceptions for various error scenarios.

Bug Fixes

  • N/A

Getting Started

To get started with the CommonPHP Configuration Manager, install the library via Composer:

composer require comphp/config

Refer to the examples/general-usage.php for a detailed example of how to define custom drivers, load drivers, and retrieve configurations.