Merged
Conversation
Contributor
Author
|
| datasource | package | from | to | | ---------- | ------------------ | ----- | ----- | | packagist | respect/validation | 2.4.4 | 3.0.1 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
e65096a to
1a4a38f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.4→^2.4 || ^3.0Release Notes
Respect/Validation (respect/validation)
v3.0.1Compare Source
v3.0.0Compare Source
Respect\Validation 3.0
Respect\Validation 3.0 is a major release with breaking changes, improved performance, and new features for more flexible validation. This version requires PHP 8.5+ (up from 8.1+ in 2.x). Update via:
For detailed migration instructions, see the Migration Guide.
Breaking Changes
Validatorrenamed toValidatorBuilderRulesnamespace toValidatorsRuleinterface toValidatorFactorytoValidatorFactoryInvalidRuleConstructorExceptiontoInvalidValidatorException.validate()now returns aResultQueryobject instead of a boolean (useisValid()for boolean checks)check()andassert()now throw a unifiedValidationException(validator-specific exceptions removed;NestedValidationExceptionremoved).Type(use specific type validators likestringType())Yes/No(usetrueVal()/falseVal())KeyNested(use nestedkey())Age/MinAge/MaxAge(usedateTimeDiff())PrimeNumber/Fibonacci/PerfectSquare/FilterVar/Uploaded(usesatisfies())VideoUrl(no direct replacement).Attributereplaced byProperty/PropertyOptional/PropertyExistsKeysplit intoKey/KeyOptional/KeyExistsLengthandSizesignatures changed to use composition (e.g.,length(v::between(5, 10)))Eachstricter (rejects non-iterables likestdClass)AllOf, etc.) require at least two validatorsAfter(ex-Call) no longer handles callback errorsContains/ContainsAny/In/EndsWith/StartsWithnow strict by defaultUrlvalidates domains/IPs, dropsnewsscheme, addsEmailformailtosokil/php-isocodes,ramsey/uuid).CalltoAfterCallbacktoSatisfiesMintoGreaterThanOrEqualMaxtoLessThanOrEqualNullabletoNullOrOptionaltoUndefOrKeyValuetoFactoryNotBlankinverted toBlank(usenot(v::blank()))NotEmptyinverted/renamed toFalsy(usenot(v::falsy()))NoWhitespaceinverted/renamed toSpaced(usenot(v::spaced()))IterableTypetoIterableVal(stricterIterableTypenow exists separately).setTemplate()andsetName()removed (usetemplated()andnamed()){{name}}placeholder renamed to{{subject}}.Factoryreplaced by PSR-11 container viaContainerRegistry.#[Template]attributes on validator classes.New Features
Result-Based Validation:
validate()returns aResultQueryfor detailed error inspection.Attribute Validation: Validate object properties via PHP attributes.
ShortCircuit Validation: Stops at first failure for dependent checks.
Dynamic Factory Validators: Create validators based on input.
Prefixed Shortcuts: Convenient wrappers for common patterns.
Result Composition: Nested results for clearer messages (e.g.,
all(v::intType())→ "Every item must be an integer").Paths in Errors: Full dot-notation paths for nested failures (e.g.,
.mysql.host must be a string).Helpful Stack Traces: Traces point to user code, not library internals.
Custom Exceptions: Pass exceptions to
assert().Placeholder Pipes: Customize template rendering (e.g.,
{{haystack|list:or}}→ "active" or "pending").Symfony Translation: Uses Symfony contracts for message translation.
New Validators:
All,BetweenExclusive,ContainsCount,DateTimeDiff,Formatted,Hetu,KeyExists,KeyOptional,Named,PropertyExists,PropertyOptional,Templated.For more details, see the Feature Guide, Validators List, or open an issue on GitHub.
v2.4.12Compare Source
v2.4.11Compare Source
v2.4.10Compare Source
v2.4.9Compare Source
v2.4.8Compare Source
v2.4.7Compare Source
v2.4.6Compare Source
v2.4.5: Fix issues with PHP 8.5Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Read more information about the use of Renovate Bot within Laminas.