Julien Mercier-Rojas

27 Followers
75 Following
239 Posts
🐘 Freelance #PHP Expert
Software Architect
Located in Paris / France
WebSitehttps://jeckel-lab.fr
LinkedInhttps://www.linkedin.com/in/jeckel/
Githubhttps://github.com/jeckel
My litle girl, isn't she pretty? #dogsofmastodon #dog

Just got a new toy, it's already Christmas !!

This is the first minitel launched in 1981.

I don't have time and place to try it yet, but soon...

Final got it, #php ValueObject for Locale, it's not an Enum, but it validates at least with locales available on the host.

https://carbon.now.sh/uG5pfifimIiSTOQKJSnL

Locale ValueObject

<?php final readonly class Locale { public function __construct( public string $locale ) { static $locales = null; if ($locales === null) { $locales = ResourceBundle::getLocales(''); } if (!in_array($locale, $locales, true)) { throw new InvalidArgumentException("Invalid locale $locale provided"); } } }

Just updated my #DDD Identity implementation package for #php 8.2

- Identities are now readonly
- prevent cloning
- unicity check (retrieving twice same Id return same instance)

Give it a try and send me your feedback : https://packagist.org/packages/jeckel-lab/identity-contract

jeckel-lab/identity-contract - Packagist

Contract and abstract classes to manage identities in Domains

Today's activity, renovation of an old workbench

Yesterday I worked on a new way to register Command Handler for a project based on #CQRS #PHP #DDD

I wanted something reusable and maching a lot of use cases.

Comment are welcome.