PackageTrack
Sign in Get early access

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 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 18
  1. v1.3.6 16 Aug 2026
    Release notes

    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 via Status::from() and, when it doesn't match, reports a proper validation error listing all allowed cases instead of blowing up with a ValueError. 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 null value for a nullable array is finally left as null. Previously the "NEON can't tell null from an empty array" workaround kicked in even for schemas explicitly declared nullable(), silently turning your null into [].
    • 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 skipDefaults is now honored inside the branch. A DynamicParameter schema also no longer registers itself for deferred validation.
    • Error messages keep unknown %placeholders% intact instead of tripping over an undefined index.
    Open source →
  2. v1.3.5 23 Feb 2026
    Release notes

    A code quality release that tightens static analysis and cleans up internals.

    • Fixed all PHPStan errors and improved phpDoc annotations
    • Switched to singleline declare statements across the codebase
    Open source →
  3. v1.3.4 08 Feb 2026

    Nothing published for this version

  4. v1.3.3 30 Oct 2025
    Release notes
    • support for PHP 8.5
    • optimized global function calls
    Open source →
  5. v1.3.2 06 Oct 2024
    Release notes
    • support for PHP 8.4
    • added Structure::extend() #66
    • added Structure::getShape() #35
    • Expect::array(shape) returns Structure
    • Structure::merge() without otherItems it merges by overwriting
    Open source →
  6. v1.3.0 11 Dec 2023
    Release notes
    • requires PHP 8.1
    • uses PHP 8.1 features
    Open source →
  7. v1.2.5 05 Oct 2023
    Release notes
    • added transform() #52
    • castTo() allows you to create objects #44 #47 #58 #46
    • refactoring
    • added path to Context::$dynamics
    • Base: removed DynamicParameter from error message
    Open source →
  8. v1.2.4 05 Aug 2023
    Release notes
    • support for PHP 8.3
    • constants are PascalCase
    Open source →
  9. v1.2.3 13 Oct 2022
    Release notes
    • support for PHP 8.2
    • cs
    Open source →
  10. v1.2.2 15 Oct 2021
    Release notes
    • supports nette/utils 2.5
    Open source →
  11. v1.2.1 04 Mar 2021

    Nothing published for this version

  12. v1.2.0 21 Jan 2021

    Nothing published for this version

  13. v1.1.0 20 Dec 2020

    Nothing published for this version

  14. v1.0.4 17 Dec 2020

    Nothing published for this version

  15. v1.0.3 25 Nov 2020

    Nothing published for this version

  16. v1.0.2 06 Jan 2020

    Nothing published for this version

  17. v1.0.1 31 Oct 2019

    Nothing published for this version

  18. v1.0.0 03 Apr 2019

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive