Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Schema Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v1.3.5

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
v1.3.4

improved phpDoc

v1.3.3
  • support for PHP 8.5
  • optimized global function calls
v1.3.2
  • 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
v1.3.0
  • requires PHP 8.1
  • uses PHP 8.1 features
v1.2.5
  • 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
v1.2.4
  • support for PHP 8.3
  • constants are PascalCase
v1.2.3
  • support for PHP 8.2
  • cs
v1.2.2
  • supports nette/utils 2.5
v1.2.0
  • Structure::skipDefaults() allow to skip defaults per structure
  • AnyOf() must not be empty
  • added AnyOf::firstIsDefault()
  • Ability to define scheme for the key Expert::arrayOf($stringType, $keyType)
v1.1.0
  • added Type::mergeDefaults() [Closes #13, Closes #24, Closes #28, Closes #31]
  • added error codes
  • ValidationException::getMessageObjects() returns array of Messages
  • Allow options to be marked as deprecated [Closes #27]
  • Structure: structure with required fields can be optional [Closes #17]
  • Type: PREVENT_MERGING prevents merging with defaults [Closes #14, Closes nette/application#257, nette/di#229]
  • 'option' changed to 'item' in error messages
v1.0.4
  • Context is not internal #29
  • AnyOf: calls normalize() on items #25 #18
  • Structure: range is ?int, ?int #20
  • fixed combination of range with nullable/dynamic #32 #23
  • Type: ignore pattern when value is null

For the details you can have a look at the diff.

v1.0.3
  • compatible with PHP 8
  • Expect::from() supports union types
  • coding style
  • tests: refactoring

For the details you can have a look at the diff.

v1.0.2
  • Assert with optinal description #7 (#8)
  • Base::required() accepts state parameter (#16)

For the details you can have a look at the diff.

v1.0.1
  • AnyOf: default value can be Schema (#12)
  • Structure: is normalized to array in normalize() #9
  • Added support for pattern() (#6)

For the details you can have a look at the diff.

v1.0.0

Handy library for validating data structures against a given Schema is here! :-)

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport