Skip to content

Allow utopia-php/validators 0.3#11

Merged
loks0n merged 1 commit into
mainfrom
chore/widen-validators
Jul 22, 2026
Merged

Allow utopia-php/validators 0.3#11
loks0n merged 1 commit into
mainfrom
chore/widen-validators

Conversation

@loks0n

@loks0n loks0n commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Widens the validators constraint to 0.2.* || 0.3.* (and updates the dev lock to 0.3.1, which the test suite passes against — 34 tests, 99 assertions).

This effectively reverts #9's downgrade while keeping 0.2 compatibility: the downgrade matched consumers that were still on validators 0.2, but appwrite-labs/edge is now moving to the validators-0.3 dependency chain (utopia-php/storage 3.0, http rc18 — appwrite-labs/edge#911) and needs waf installable alongside it. After merge this needs a 0.0.7 tag.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR allows the WAF package to use validators 0.3 while retaining 0.2 compatibility. The main changes are:

  • Widen the validators constraint to 0.2.* || 0.3.*.
  • Update the development lock file from validators 0.2.8 to 0.3.1.
  • Align the locked dependency with the package's existing PHP 8.5 floor.

Confidence Score: 5/5

The dependency update looks mergeable after confirming the validator subclass contract remains compatible with 0.3.x.

  • The locked dependency keeps the existing PHP 8.5 requirement.
  • The lock metadata matches the widened constraint.
  • A 0.3.x abstract API change could make the existing Conditions subclass fail at load time.

composer.json

Important Files Changed

Filename Overview
composer.json Widens the runtime validators constraint across two release lines; the inherited validator contract should remain compatible with both.
composer.lock Updates validators to 0.3.1 and refreshes matching lock metadata without changing the root PHP platform floor.

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
composer.json:8
**Validator Contract May Be Incompatible**

This constraint lets downstream Composer updates select validators 0.3.x for `Conditions`, which directly extends `Utopia\Validator`. If 0.3.x changed an abstract method signature, added an abstract method, or removed `TYPE_ARRAY`, loading or calling `Conditions` will fail with a PHP fatal error; compatibility with both allowed release lines should be confirmed before publishing the widened constraint.

Reviews (1): Last reviewed commit: "Allow utopia-php/validators 0.3" | Re-trigger Greptile

Comment thread composer.json
"require": {
"php": ">=8.5",
"utopia-php/validators": "0.2.*"
"utopia-php/validators": "0.2.* || 0.3.*"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Validator Contract May Be Incompatible

This constraint lets downstream Composer updates select validators 0.3.x for Conditions, which directly extends Utopia\Validator. If 0.3.x changed an abstract method signature, added an abstract method, or removed TYPE_ARRAY, loading or calling Conditions will fail with a PHP fatal error; compatibility with both allowed release lines should be confirmed before publishing the widened constraint.

Prompt To Fix With AI
This is a comment left during a code review.
Path: composer.json
Line: 8

Comment:
**Validator Contract May Be Incompatible**

This constraint lets downstream Composer updates select validators 0.3.x for `Conditions`, which directly extends `Utopia\Validator`. If 0.3.x changed an abstract method signature, added an abstract method, or removed `TYPE_ARRAY`, loading or calling `Conditions` will fail with a PHP fatal error; compatibility with both allowed release lines should be confirmed before publishing the widened constraint.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

@loks0n
loks0n merged commit 0c6b1ac into main Jul 22, 2026
5 checks passed
@loks0n
loks0n deleted the chore/widen-validators branch July 22, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant