hypnotox / abyss
A PHP package implementing array schema validation.
dev-main
2023-05-17 19:35 UTC
Requires
- php: >=8.1
Requires (Dev)
- fakerphp/faker: ^1.19
- friendsofphp/php-cs-fixer: ^3.4
- phpbench/phpbench: ^1.2
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.15
This package is auto-updated.
Last update: 2024-10-21 04:41:47 UTC
README
A PHP package implementing array to object schema validation and mapping. (The idea of this package has changed a bit and might change again in the future)
The package is currently not in any usable / stable state, but is in active development towards a target. It will be tagged as soon as base functionality is present and tested.
This package is very experimental and can change very much pre version 1.0!
This is just a personal project, but follows semantic versioning and will be stable once reaching its first major release.
PRs are welcome.
Target constraints
- Type constraint
- Scalars
- int, string, float, bool
- Array (I'm currently unsure if
\Traversable
should be allowed)- list<T>
- map<K, T>
- Objects
- instanceof T
- Scalars
- Value constraint
- Scalar
- Numeric
- equal to / inside bounds
- String
- equal to
- regex
- Enum
- Numeric
- Array
- size equal to / inside bounds
- nested array
- Scalar
- Object shape constraint
- Custom constraints
Installation
Simply require it using composer: composer require hypnotox/abyss
Features
// TODO
Usage
// TODO