Skip to content

v1.0.0-RC3

Pre-release
Pre-release

Choose a tag to compare

@SoloPHP SoloPHP released this 26 Oct 08:59
· 10 commits to main since this release
b682a39

Third release candidate of Solo Input (solophp/input). It adds #[Input(partial: true)], which moving the first real application to the package called for: the body of a partial update declares itself, and Inputs::toArray() gives its change set without every update endpoint having to ask for it.

This is a prerelease: the 1.0 API is being validated in real applications before the stable 1.0.0 tag.

Changes since 1.0.0-RC2

  • #[Input(partial: true)] marks the body of a partial update. Inputs::toArray() without an onlyProvided argument then gives the fields the request supplied, so a default never overwrites what is stored; an absent field still reads as its default, and onlyProvided: false asks for every field. The flag comes from the nearest #[Input] of the class or its parents, nested DTOs follow the call they are in, and a partial DTO the factory did not build exports nothing. See Attributes → #[Input] and Inputs::toArray().
  • Inputs::toArray()'s $onlyProvided is ?bool with a null default; passing a bool works as before.

Install

composer require 'solophp/input:^1.0@RC'

See the documentation and the full diff since RC2.