Romain Canon

@Romm
123 Followers
88 Following
252 Posts
๐Ÿ˜ PHP developer, OSS enthusiast
Githubhttps://github.com/romm/
Bluesky@romain-canon.com
Twitter@Rommsteinz
Random sighting while drinking a beer with @mopolo in a bar in Lyon, France #PHP #Composer ๐Ÿป

RE: https://mastodon.online/@afup/115852762256622438

Coucou Lille, on se voit le 22 mai pour parler de tests ? ๐Ÿค—

@dunglas, @nicolasgrekas, @asgrim and @Girgias talking about PHP, its future and @thephpf ๐Ÿ˜

Thank you @afup for this amazing event!

I got my hands on this beauty yesterday! Thank you, @OndrejMirtes for the Elephpant! And thank you, @jdecool, for bringing it to the @afup's meetup last night. โค๏ธ

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:

When dealing with input data that is a string representation of an array, for instance a comma-separated list, a converter attribute can be used to convert the string into a list:

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!