NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
Packagist, #89 most downloaded on Packagist
π Nette Schema: validates and normalizes data such as configuration or API input against a schema described in a few readable lines of PHP, with precise error messages.
Latest stable
v1.4.0
Last release 1 months ago
22 Oct 2026
Ships fairly regularly
a new release about every 6 months
Some releases are documented
notes for 11 of 20 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
20 releases Β· first in 2019
Drag across the ruler to compare, or tap a release to open it.
Smaller fixes: anyOf()->deprecated() emits its warning, min() and max() keep the precision of large integer bounds, and the internal _prevent_mergingβ¦
Your schema can now be the documentation of your configuration: give elements a
description, export the schema as JSON Schema, and editors offer completion, explain
each option and underline mistakes right in the config file.
NotSupportedException instead of exporting somethingExpect::enum(Suit::class) accepts the backing value or the case itself and always givesExpect::from() maps to it automatically.Expect::type(Suit::class) keeps meaning plain instanceof, as for any other class.Expect::tuple([Expect::string(), Expect::int()]). otherItems() describes the restextend() appends positions, and when configurations are layered, a later tupleExpect::listOf('string', wrap: true) also accepts a singleemail: foo@example.com andemail: [a@example.com, b@example.com] work.Expect::arrayOf('string')->mergeMode(MergeMode::Replace)OverwriteKeys and AppendKeys merge by keys. AnyExpect::bool()->mergeWith(fn($value, $base) => $value || $base). A schema without themcastTo('?string') keeps a null and casts everything else. A classnull even without the question mark, soExpect::string()->nullable()->castTo(DateTime::class) just works.Expect::string() returns a StringType, Expect::int()NumberType, Expect::listOf() an ArrayType, so your IDE and PHPStan know which optionsType, so existing code keeps working.before() on the same element still replaces theExpect::arrayOf(Expect::type('int')->nullable()).min(), max(), pattern(), items() andmergeDefaults() on a union such as Expect::type('int|string') belong to the variants:Expect::anyOf(Expect::int()->min(1), Expect::string()->min(1)). Likewise pattern() on aitems() on a string or a number and mergeDefaults() on anything butanyOf() containing a structure or an array gives null for a null input,null sits among the variants.anyOf()->deprecated() emits its warning, min() and max() keep the_prevent_merging marker no longerYour coding agent can read these notes before it upgrades. Set up the MCP server β
A maintenance release: PHP 8.6 support, a nicer way to write defaults, and a few edge cases that now fail with a clear message instead of a confusing
A maintenance release: PHP 8.6 support, a nicer way to write defaults, and a few edge cases that now fail with a clear message instead of a confusing one.
Expect::string(default: 'abc')Expect::from(), or a key transformed into something that cannot be a keyExpect::from() ignores non-public and static propertiesprocess() recursively on the same Processor instance works correctlyA maintenance release: castTo() learns backed enums, plus a few fixes around nullable arrays, deprecated structures and anyOf() .
A maintenance release: castTo() learns backed enums, plus a few fixes around nullable arrays, deprecated structures and anyOf().
Expect::string()->castTo(Status::class) turns the value into the enum case, and a value matching no case is a validation error listing the allowed onesnull for a nullable() array stays null instead of turning into []anyOf() are validated by DI again, and skipDefaults is honored there%placeholders% in messages stay intact, and getWarnings() works before the first process()A code quality release that tightens static analysis and cleans up internals.
A code quality release that tightens static analysis and cleans up internals.
declare statements across the codebaseNothing published for this version
optimized global function calls
added Structure::getShape() #35
requires PHP 8.1 uses PHP 8.1 features
support for PHP 8.3 constants are PascalCase
support for PHP 8.2 cs
supports nette/utils 2.5
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.