@Eslamunto findOneBy takes an array and $username is a string. Fix this line