add User persistence: model, migration, eloquent + fake repo

UserModel maps users table (id, email unique, password_hash,
is_admin bool default false). EloquentUserRepository implements
UserRepository: create from CreateUserDto, find by id,
findByEmail. toDomain() materializes a User entity wrapping email
in EmailAddress vo. FakeUserRepository: in-memory map keyed by
auto-incrementing id, returns defensive copies on read (per
youngstartup pattern). composer stan script now passes
--no-progress for cleaner ci output.
This commit is contained in:
yisroel 2026-05-06 15:10:21 +03:00
parent 533320fcac
commit eca73213f5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
5 changed files with 171 additions and 1 deletions

View file

@ -49,7 +49,7 @@
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" --names=server,queue,logs --kill-others"
],
"stan": "phpstan analyse",
"stan": "phpstan analyse --no-progress",
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer check --diff -vvv",