| Github | https://github.com/romm/ |
| Bluesky | @romain-canon.com |
| @Rommsteinz |
| Github | https://github.com/romm/ |
| Bluesky | @romain-canon.com |
| @Rommsteinz |
RE: https://mastodon.online/@afup/115852762256622438
Coucou Lille, on se voit le 22 mai pour parler de tests ? ๐ค
Keys coming from the input may differ from the target object properties and
need to be renamed before mapping the values to the object.
With the following converter example, keys will be renamed properly:
First example: boolean conversion. Values such as 'yes'/'no' can be used in malformatted external APIs, and need to be converted to a boolean value.
This can be achieved by creating a custom converter that will convert these values to the expected type.
๐ #PHP object-mapper library Valinor v2.1.0 released!
This version introduces a powerful new feature: attribute converters, which provide more granular control over the mapping of properties.
No attribute converter is provided out of the box, instead we made it very easy for you to create your own, enabling fine-grained customization!
See below for examples โคต๏ธ
Things I've been up to over the last 30 days:
- ๐จโ๐ผ Became a dad
- ๐ In between diaper changes, I worked on preparing the release of version 2.0 of Valinor, a PHP library that helps to map any input into a strongly-typed value object structure.
Release notes: https://github.com/CuyZ/Valinor/releases/tag/2.0.0
Upgrade guide: https://valinor.cuyz.io/2.0/project/upgrading/#upgrade-from-1x-to-2x
Enjoy! ๐ฅณ
๐ Big milestone incoming for #PHP OSS: @OndrejMirtes (PHPStan) and @maks_rafalko (Infection) are joining forces to improve the integration of their tools when used together.
Expect smoother integration, better mutation analysis, and less false-positive result for these two awesome projects!