nette/schema
📐 Nette Schema: validating data structures against a given Schema.
v1.3.6
393M downloads/mo
#96 most downloaded on composer
nette/schema
What this package is like to depend on
Last release 7 days ago
16 Aug 2026
Release timing varies
gaps range from 2 weeks to 13 months
Some releases are documented
notes for 9 of 18 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
18 releases · first in 2019
4 releases in the last 12 months
see the full history below
Release timeline
18 releases · Apr 2019 to Aug 2026Releases
latest 18-
v1.3.616 Aug 2026Release notes
Open source →A round of fixes to the corners of the validation pipeline that only bite once your schema gets interesting: nullable arrays, invalid keys, deprecated items and
anyOf()branches. On top of that,castTo()now speaks backed enums.✨ New Features
- castTo() now accepts a backed enum –
Expect::string()->castTo(Status::class)converts the value viaStatus::from()and, when it doesn't match, reports a proper validation error listing all allowed cases instead of blowing up with aValueError. Pure (non-backed) enums are rejected up front with a clear message. - Casting to a class that can't swallow the given value no longer surfaces as a bare
Error– you get an InvalidStateException naming the target class, so you know what failed to be constructed.
🐛 Bug Fixes
- A
nullvalue for a nullable array is finally left asnull. Previously the "NEON can't tellnullfrom an empty array" workaround kicked in even for schemas explicitly declarednullable(), silently turning yournullinto[]. - Items with an invalid key are now dropped instead of being merged together – all failing keys used to collapse into a single
''entry, quietly overwriting each other's values. - Processor::getWarnings() no longer dies with an error when called before anything was processed; it simply returns an empty array.
deprecated()on a required structure no longer emits a warning when the item isn't present in the input at all – you only get warned about deprecated items you actually used.- anyOf() stopped losing information in the winning branch: dynamic parameters found inside are propagated to the outer context again (they used to be silently forgotten, so DI never validated them), and
skipDefaultsis now honored inside the branch. ADynamicParameterschema also no longer registers itself for deferred validation. - Error messages keep unknown
%placeholders%intact instead of tripping over an undefined index.
- castTo() now accepts a backed enum –
-
v1.3.523 Feb 2026Release notes
Open source →A code quality release that tightens static analysis and cleans up internals.
- Fixed all PHPStan errors and improved phpDoc annotations
- Switched to singleline
declarestatements across the codebase
-
v1.3.408 Feb 2026Nothing published for this version
-
v1.3.330 Oct 2025 -
v1.3.206 Oct 2024 -
v1.3.011 Dec 2023 -
v1.2.505 Oct 2023 -
v1.2.405 Aug 2023 -
v1.2.313 Oct 2022 -
v1.2.215 Oct 2021 -
v1.2.104 Mar 2021Nothing published for this version
-
v1.2.021 Jan 2021Nothing published for this version
-
v1.1.020 Dec 2020Nothing published for this version
-
v1.0.417 Dec 2020Nothing published for this version
-
v1.0.325 Nov 2020Nothing published for this version
-
v1.0.206 Jan 2020Nothing published for this version
-
v1.0.131 Oct 2019Nothing published for this version
-
v1.0.003 Apr 2019Nothing published for this version