remove default values from user constructors

Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
This commit is contained in:
Yisroel Baum 2026-04-26 10:46:07 +03:00
parent f95adddaaf
commit cd40483cd4
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
7 changed files with 21 additions and 14 deletions

View file

@ -63,6 +63,7 @@ class AuthControllerTest extends TestCase
$this->createUser->execute(new CreateUserRequest(
email: 'existing@test.com',
password: 'password1',
isAdmin: false,
));
$this->controller = new AuthController();