Skip to content

Version 0.34.0

Latest

Choose a tag to compare

@veewee veewee released this 27 May 14:28
0.34.0
0edbbb5

What's Changed

  • Migrate to STAB optics (Iso<S,T,A,B> / Lens<S,T,A,B>) by @veewee in #64

Warning

Custom encoders need updating. Reflecta's optics moved from 2 type parameters to 4, the STAB form: Iso<S, T, A, B> and Lens<S, T, A, B>. If you wrote your own XmlEncoder, SoapMethodEncoder, or anything implementing the Provides*Lens or DecoratingEncoder features, widen your generic annotations from 2 to 4 parameters.

S and A keep their old meaning (the whole, and the focus). T and B are the write-side counterparts, used when a write changes the type. If yours never does, just repeat them: XmlEncoder<Data, Data, Xml, Xml>.

Nothing changes at runtime. Method signatures are the same, so any code without explicit Psalm/PHPDoc annotations keeps working as is. The Reflecta 1.0.0 upgrade guide walks through the rest.

Full Changelog: 0.33.0...0.34.0