DocumentShape::field() should only allow arrays #23

Merged
c.fahner merged 2 commits from issues/21 into main 2026-08-29 09:44:43 +02:00
Owner

Resolves #21.

Restrict DocumentShape::field() to only allow full array paths, essentially making it a shorthand for new FieldPath

Resolves #21. Restrict DocumentShape::field() to only allow full array paths, essentially making it a shorthand for `new FieldPath`
c.fahner added this to the v0.1 milestone 2026-08-22 09:55:57 +02:00
Restricted DocumentShape::field() to only allow full array paths, essentially making it a shorthand for `new FieldPath`
@ -58,3 +58,2 @@
$inputs[] = $spec instanceof Closure
? $spec(self::field((string)$field))
: new Expr\Equal(self::field((string)$field), $spec);
? $spec(self::field([ (string)$field ]))
Author
Owner

Could just use new FieldPath directly here

Could just use `new FieldPath` directly here
c.fahner marked this conversation as resolved
c.fahner stopped working 2026-08-29 09:44:43 +02:00
7 minutes 31 seconds
c.fahner deleted branch issues/21 2026-08-29 09:44:43 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 7 minutes 31 seconds
c.fahner
7 minutes 31 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd!23
No description provided.