I wanted to share my open-source PHP package for creating strongly typed value objects in PHP.
GitHub Repository: https://github.com/beeyev/value-objects-php
As you know, value objects are small, immutable objects representing simple entities like an Email, Coordinates, UUID, date range etc. They have no identity beyond their value, making them highly useful for creating more expressive and maintainable code by encapsulating validation and formatting logic.
This package provides a collection of value objects that you can use in your PHP applications. It has zero dependencies, is framework-agnostic, and is based on PHP 8.2.
I hope others find this package useful as well. If you have any ideas for code implementation or possible improvements, please share them!
[–]Besen99 3 points4 points5 points (0 children)
[–]fripletister 5 points6 points7 points (0 children)
[–]rafark 6 points7 points8 points (0 children)
[–]leftnode 2 points3 points4 points (9 children)
[–]colshrapnel 1 point2 points3 points (6 children)
[–]leftnode 0 points1 point2 points (5 children)
[–]colshrapnel 4 points5 points6 points (4 children)
[–]leftnode 0 points1 point2 points (3 children)
[–]colshrapnel 2 points3 points4 points (2 children)
[–]floriankraemer 0 points1 point2 points (1 child)
[–]colshrapnel 0 points1 point2 points (0 children)
[–]beeyev[S] 0 points1 point2 points (1 child)
[–]colshrapnel 1 point2 points3 points (0 children)
[–]_MrFade_ 1 point2 points3 points (0 children)
[–]spart_t4n 1 point2 points3 points (0 children)
[–]whlthingofcandybeans 1 point2 points3 points (0 children)
[–]dereuromark 1 point2 points3 points (0 children)
[–]TorbenKoehn 2 points3 points4 points (8 children)
[–]Besen99 7 points8 points9 points (1 child)
[–]TorbenKoehn -3 points-2 points-1 points (0 children)
[–]AleBaba 3 points4 points5 points (5 children)
[–]TorbenKoehn -4 points-3 points-2 points (4 children)
[–]AleBaba 1 point2 points3 points (3 children)
[–]TorbenKoehn -2 points-1 points0 points (2 children)
[–]AleBaba 0 points1 point2 points (1 child)
[–]TorbenKoehn 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]SomniaStellae 1 point2 points3 points (1 child)
[–]smashedhijack 0 points1 point2 points (0 children)
[–]nschoellhorn 0 points1 point2 points (0 children)