Kaan
How do I cleanly implement "withX" copy methods on readonly value objects?
A readonly withX returns a new instance: `new self` with named arguments is portable, and `clone($this, [...])` fits PHP 8.5 when validation is simple.
Tag
Object-oriented programming concepts and design.
1 answered questions carry this tag.
A readonly withX returns a new instance: `new self` with named arguments is portable, and `clone($this, [...])` fits PHP 8.5 when validation is simple.