This repository was archived by the owner on Dec 15, 2025. It is now read-only.
Repository navigation
Releases: michelphp/php-requestkit
Releases · michelphp/php-requestkit
Release list
Release v2.0.0 - HTTP validation, i18n, and namespace change
This major release introduces a new namespace, a full internationalization system, and powerful features for validating HTTP requests, headers, and forms.
BREAKING CHANGE: The root namespace has been changed from PhpDevCommunity\RequestKit to Depo\RequestKit. All use statements in projects using this library must be updated.
Features:
HTTP Request Handling:
withHeaders(): A new method inAbstractSchemato define validation rules for incoming HTTP headers (e.g., API keys, Content-Type).processFormHttpRequest(): A new method inAbstractSchemato securely process form submissions.- CSRF Protection: The
processFormHttpRequestmethod includes optional, secure CSRF token validation to prevent cross-site request forgery attacks.
Core Validation:
equals(): A generic constraint has been added toAbstractType, allowing any data type to be checked for strict equality against a specific value.
Internationalization (i18n):
- A new
Localeclass now manages all error messages, allowing for easy translation. - The library now ships with built-in translations for English ('en') and French ('fr').
Improvements & Fixes:
- Security: The error message for the
equals()constraint no longer reveals the expected value, preventing potential secret leakage. - Refactoring: The entire library has been moved under the
Depovendor namespace for better project identity. - Dependency Removal: The dependency on
phpdevcommunity/validatorhas been removed, making the library fully self-contained. - Testing: Added comprehensive unit tests for all new features, including
equals,withHeaders,processFormHttpRequest, and theLocalesystem. - Documentation: The
README.mdhas been significantly updated with examples and explanations for all new features.
fix ItemType validator
1.0.5 fix ItemType validator
feat(schema): add support for Type::map() to validate key-value objects
add support for Type::map() to validate key-value objects
feat(arrayof): allow optional acceptance of string keys
Added support for string keys in ArrayOf types via acceptStringKeys() method.
By default, keys must be integers. When enabled, string keys are trimmed and accepted.
Add allowEmptyData option to validation processor
- Add allowEmptyData parameter to process() method
- Skip validation when empty data is explicitly allowed
- Maintain backward compatibility with default false value
Support psr/http-message 1.0+2.0
Update dependency constraint to "^1.0 || ^2.0"
Initial commit for php-requestkit library
1.0.0 Initial commit for php-requestkit library