Possible null argument in App\Entity\User::getTotpAuthenticationConfiguration() method.
User::totpSecret is nullable:
#[ORM\Column(type: Types::STRING, nullable: true)]
private ?string $totpSecret = null;
User::getTotpAuthenticationConfiguration() returns null|TotpConfigurationInterface. To prevent \RuntimeExceptions and comply w/ the interface method signature, we should be doing:
// App\Entity\User
public function getTotpAuthenticationConfiguration(): ?TotpConfigurationInterface
{
return $this->totpSecret ? new TotpConfiguration($this->totpSecret, TotpConfiguration::ALGORITHM_SHA1, 30, 6) : null;
}

Possible null argument in
App\Entity\User::getTotpAuthenticationConfiguration()method.User::totpSecretis nullable:User::getTotpAuthenticationConfiguration()returnsnull|TotpConfigurationInterface. To prevent \RuntimeExceptions and comply w/ the interface method signature, we should be doing: