mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-07 13:14:20 +01:00
Create Testcoverage and upgrade Symfomy and PHP
* Some tests * More tests! * Tests 3 * Move getScores from Candidate to Quiz * Add some suggestions for future refactoring * - **Add Gedmo doctrine-extensions and Stof bundle integration** - Added `stof/doctrine-extensions-bundle` and `gedmo/doctrine-extensions` dependencies. - Integrated `Timestampable` behavior for `Created` fields in entities. - Updated `bundles.php` to register StofDoctrineExtensionsBundle. - Added configuration for the Stof bundle. - Simplified `SeasonVoter` with `match` expression and added new tests. - Minor fixes and adjustments across various files. * WIP * All the tests * Base64 tests * Symfomny 7.4.0 * Update * Update recipe * PHP 8.5 * Rector changes * More 8.5 * Things
This commit is contained in:
@@ -19,6 +19,17 @@ class SeasonRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Season::class);
|
||||
}
|
||||
|
||||
public function findOneBySeasonCode(string $seasonCode): ?Season
|
||||
{
|
||||
return $this->getEntityManager()->createQuery(<<<DQL
|
||||
select s from Tvdt\Entity\Season s
|
||||
where s.seasonCode = :seasonCode
|
||||
DQL)
|
||||
->setParameter('seasonCode', $seasonCode)
|
||||
->setMaxResults(1)
|
||||
->getOneOrNullResult();
|
||||
}
|
||||
|
||||
/** @return list<Season> Returns an array of Season objects */
|
||||
public function getSeasonsForUser(User $user): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user