refactor(users): authenticate the current user per request
Both current-user services are shared and taken in the constructor of hundreds of
controllers and services, so they cannot be rebuilt per request — their state is
replaced instead. The Eloquent user is rehydrated (raw attributes, exists, relations
dropped), the legacy one through the new setProperties(), which restores the declared
properties to their default and removes the dynamic ones left by the previous visitor.
CurrentUserAuthenticator drives it and is idempotent per request object: under FPM the
boot and the kernel serve the same Request, so the second call issues no extra queries.
The boot calls it before resolving the translator, which reads the locale of the profile.
controllers and services, so they cannot be rebuilt per request — their state is
replaced instead. The Eloquent user is rehydrated (raw attributes, exists, relations
dropped), the legacy one through the new setProperties(), which restores the declared
properties to their default and removes the dynamic ones left by the previous visitor.
CurrentUserAuthenticator drives it and is idempotent per request object: under FPM the
boot and the kernel serve the same Request, so the second call issues no extra queries.
The boot calls it before resolving the translator, which reads the locale of the profile.