nette/schema
nette/schema is a small PHP library for validating and normalizing structured data. Define schemas for arrays, configuration, and user input with type checks, defaults, required fields, ranges, and clear error messages—ideal for safe config loading.
A code quality release that tightens static analysis and cleans up internals.
declare statements across the codebaseimproved phpDoc
Structure::extend() #66Structure::getShape() #35Expect::array(shape) returns StructureStructure::merge() without otherItems it merges by overwritingtransform() #52castTo() allows you to create objects #44 #47 #58 #46Structure::skipDefaults() allow to skip defaults per structureAnyOf() must not be emptyAnyOf::firstIsDefault()Expert::arrayOf($stringType, $keyType)normalize() on items #25 #18For the details you can have a look at the diff.
from() supports union typesFor the details you can have a look at the diff.
required() accepts state parameter (#16)For the details you can have a look at the diff.
normalize() #9pattern() (#6)For the details you can have a look at the diff.
Handy library for validating data structures against a given Schema is here! :-)
How can I help you explore Laravel packages today?