Skip to content

v0.1

Latest
Compare
Choose a tag to compare
@tlmcclatchey tlmcclatchey released this 17 Feb 17:59

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.