Upgrading

In your application was using the previous version 3 of this package.

POPO

  1. Remove all extends DataTransferObject

  2. Remove all implements ValidatedDataTransferObject and move the return content of public static function request() to a class attribute on top of this DTO class name (before) like the following #[Validate(MyFormRequest::class)], then add implements RouteTransferableObject

  3. Search for any ::fromArray or ::fromRequest() calls to these DTO classes then replace with map([])->to(MyDtoClass::class) or map($request)->to(MyDtoClass::class)

Logic separation on properties attributes

  1. Change all #[WithDefaultValue(Authenticatable::class)] with #[Inject(Authenticatable::class)]

  2. Change all #[BindModel] with #[FromRouteBinding] (and in case of having some content on the BindModel add below #[ModelWith(['relation1', 'relation2'])])

TypeScript types generation

  1. TypeScript generation command now has been removed, instead you can engineer something of your own using Generating TypeScript code

Last updated

Was this helpful?