Releases: phpdevcommunity/php-options-resolver
Releases · phpdevcommunity/php-options-resolver
Release version 2.0.1
Features:
- Added addRequiredIf for conditional requirements based on other option values.
- Added deprecate method to mark options as deprecated and trigger E_USER_DEPRECATED warnings.
- Added min and max constraints helpers for string length, numeric values, and array counts.
- Added support for chaining multiple validators on a single option.
Documentation:
- Added documentation for conditional requirements, deprecation, min/max constraints, and multiple validators (EN/FR).
Composer:
- Updated project description and author homepage.
- Added ext-mbstring requirement.
Release version 2.0.0
Breaking Changes:
- Removed the new factory method. Use specific static factory methods instead.
- Renamed setRequired to required for better fluency.
- Removed setDefaultValue. Use setOptional to define optional values with defaults.
- Enforced strict boolean return types for validation methods.
Features:
- Added static factory methods for strict type enforcement (string, int, float, bool, array, iterable, mixed).
- Added setOptional to clearly distinguish optional parameters.
- Improved internal validation logic for better type safety.
Documentation:
- Complete rewrite of the documentation with a new professional title and description.
- Added comprehensive examples for all available option types.
- Added guides for required vs optional fields and custom validation.
- Added full French translation of the documentation.
- Added License section.
Tests:
- Updated all test suites to align with the v2.0.0 API.
Initial commit for phpdevcommunity/php-options-resolver: a library for processing and validating option arrays in PHP
Initial commit for phpdevcommunity/php-options-resolver: a library for processing and validating option arrays in PHP