Thanks you @mopolo.dev for helping out!
Thanks you @mopolo.dev for helping out!
π The `.io` domain names have become really expensive over the past couple of years, so Iβve decided to move the #PHP Valinor documentation from valinor.cuyz.io to valinor-php.dev
π #PHP object-mapper library Valinor v2.3.2 released!
Mainly a bug-fix release, with 2 notable changes:
- End of PHP 8.1 support (support ended in December 2025)
- Removal of `composer-runtime-api` requirement, making this library completely dependency free. π
github.com/CuyZ/Valinor...
Coucou Lille, on se voit le 22 mai pour parler de tests ? π€
Just updated my profile picture, after more than a decade with the old one everywhere on the web! It feels weird but refreshing π
And now @packagist.com π₯
Thank you so much for sponsoring my work and placing trust in my humble contribution to the PHP ecosystem! π
β¨ Thank you @pscheit.bsky.social for the generous sponsoring, which allows me to spend more time on Valinor! OSS community is the best! π
github.com/CuyZ/Valinor...
Test output before Symfony 7.4
Test output as of Symfony 7.4
As of #Symfony 7.4, functional testsβ error rendering will finally get you straight to the point with a beautiful, concise output π₯³ Especially useful when doing large refactorings that make dozens of such tests fail while progressing.
Before/After π
We've already had really interesting feedback π₯
I just added a new option E to the poll (explanation is in the thread) β I'd love to have more feedback on how you handle your HTTP requests; Help us making it easy to map a request's values to your controllers!
github.com/CuyZ/Valinor...
π Mapping an HTTP request to a controller using Valinor will soon be a thing!
But before that, I need help and feedback from people β I'd love if you could read and vote on this discussion:
github.com/CuyZ/Valinor...
Thanks a lot! π
(RT for reach? π₯Ή)
π #PHP object-mapper library Valinor v2.2.1 released!
This version is sponsored by @elias.haeussler.dev who sent a generous donation β€οΈ
A huge effort was spent to fix a nasty bug, this *could* break your app if you use converters β please read release notes carefully:
github.com/CuyZ/Valinor...
Mérité à peu près à 1000%
People on stage talking about PHP
@dunglas.dev, @nicolasgrekas.bsky.social, @asgrim.dev and Gina Banyard talking about PHP, its future and @thephpf.bsky.social π
Thank you @afup.org for this amazing event!
In four days at #ForumPHP, Iβll explain how to never run out of clean socks.
(and, incidentally, how to handle #Symfony deprecations)
Baptiste Langlade β
β¬οΈ
Baptiste Monade β
It will be awesome no matter what!
The signature of the `map` method defines when the mapper uses it, so this can not be enforced by an interface.
String to string? `function map(string $value): string`
String to int? `function map(string $value): int`
The signatures depend on the usage. π
β¦and endless other possibilities! π
Want to know more about converters? Check out valinor.cuyz.io/2.1/how-to/c...
Want to see more examples? Check valinor.cuyz.io/2.1/how-to/c...
Want to use attribute converters? `composer update cuyz/valinor` π
Release notes: github.com/CuyZ/Valinor...
Enjoy!
Keys renaming converter example
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:
Explode converter example
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:
Boolean conversion converter example
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.
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 ‡οΈ
Valinor 2.1 release banner
π #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.
More info below ‡οΈ
Baptiste is doing great work, definitely worth taking a look at it! π
To end on a better note: although we have opposite opinions on this topic, thank you for your commitment to the community and everything you did and will do π
Buying these goodies help the AFUP association that has been around for 25 years, organizing events to promote PHP for thousands of people.
I'm a bit concerned by this public shaming when this could have been handled privately with AFUP's board. IMHO this hurts PHP more than a mug will ever do.
> The only thing you transfer [β¦] are the two words βPHPβ and βdeadβ
Thatβs not the truth, that is your opinion. My opinion is that some people out there get the cultural reference, are smart enough not to only remember that βPHP is deadβ, and think itβs cool enough to buy a t-shirt or a mug.
> You get decision makers [β¦] move entire companies to other langs cause they heard PHP may be dying
Should we blame AFUP for selling mugs, or the decision makers who are lazy enough to move to other langs based on a false supposition π€? Doesn't seem too hard to know that PHP is well alive in 2025.
A mug with a logo referring to "Punkβs not dead" but "Punk" is replaced by "PHP"
How can people not want to get such a beautiful mug βοΈ
Helps me write PHP everyday!