v6.0.0
Hurrah version 6 landing! There is a lot in this one and it's long overdue, but we finally hit a great spot, so without further adieu.
Version 6 brings #[Input]
defined InputTypes way forward and solidifies their overall functionality. #[Input]
attribute defined InputTypes are becoming my preferred way of defining these types. One single DTO or even Doctrine entity (if you so dare!) can be used to define both input and output types, with virtually no side-effects or missing feature functionality. Prior to version 6, #[Input]
defined types were rather limited. This is no longer the case! If you haven't had a chance yet, now is the time to give them a spin! 👍 A special thanks to @Lappihuan for all his teamwork on the InputType improvements. This wouldn't have happened without him!
In addition to the huge improvements made on InputTypes, we now have support for native Enums (shoutout to @dsavina), union return typing, and generics support!
Dependencies:
- 652440a Symfony ^6 is now supported.
Breaking Change:
-
#458 With
Input
annotated InputTypes, if you're using the same class for multiple types, like an update type and create type (also now a possibility), if you provide a name, you must also provide thedefault
parameter if you want the InputType to be the "default".#[Input] // Is default #[Input(default: false)] // Not default #[Input(name: 'SomethingInput', default: true] // Is default #[Input(name: 'UpdateSomethingInput'] // Not default
New Features:
- #409 Native Enum support! 🎉
- #467 Support native union return typing
- #468 Support generic phpdoc typed interables for output type values
- #435 New Custom InputType Validator offering flexibility in how you can handle validation on all of your
#[Input]
attributes. - #458 Recursive InputType resolving
- #466 Bring existing getter
#[Field]
defined functionality from output#[Type]
objects to InputType annotated fields, via setters.