mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-07 05:04:20 +01:00
Refactor entities and codebase for native property usage
- Replaced getters/setters with direct property access across entities and repositories. - Added and configured `martin-georgiev/postgresql-for-doctrine` for PostgreSQL enhancements. - Updated Doctrine configuration with types, mappings, and JSONB query functions. - Removed unused `EliminationService` and related YAML configurations.
This commit is contained in:
@@ -23,7 +23,7 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
||||
* */
|
||||
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
|
||||
{
|
||||
$user->setPassword($newHashedPassword);
|
||||
$user->password = $newHashedPassword;
|
||||
$this->getEntityManager()->persist($user);
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
||||
throw new \InvalidArgumentException('User not found');
|
||||
}
|
||||
|
||||
$user->setRoles(['ROLE_ADMIN']);
|
||||
$user->roles = ['ROLE_ADMIN'];
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user