feat: remove obsolete date range override

This commit is contained in:
2026-08-31 16:56:36 +02:00
parent 86c5d23181
commit 127ced4378
42 changed files with 152 additions and 353 deletions
+7 -21
View File
@@ -93,14 +93,8 @@ class DispositionRepositoryTest extends KernelTestCase
{
$dql = $this->contractQuery()->getDQL();
$this->assertStringContainsString(
'assignment.dateTo IS NOT NULL AND assignment.dateTo > :tomorrow',
$dql
);
$this->assertStringContainsString(
'assignment.dateTo IS NOT NULL AND assignment.dateTo = :tomorrow',
$dql
);
$this->assertStringContainsString('destination.dateTo > :tomorrow', $dql);
$this->assertStringContainsString('destination.dateTo = :tomorrow', $dql);
}
public function testContractReminderBindsTomorrowAsADateAndNotATimestamp(): void
@@ -114,8 +108,8 @@ class DispositionRepositoryTest extends KernelTestCase
}
/**
* The bug that killed this query: destination.dateTo and assignment.dateTo are DATE columns,
* and Doctrine binds a DateTimeImmutable as 'Y-m-d H:i:s', which a DATE never equals.
* The bug that killed this query: destination.dateTo is a DATE column, and Doctrine binds a
* DateTimeImmutable as 'Y-m-d H:i:s', which a DATE never equals.
*/
public function testInvoiceReminderBindsADateAndNotATimestamp(): void
{
@@ -129,21 +123,13 @@ class DispositionRepositoryTest extends KernelTestCase
}
/**
* Without the IS NULL guard on the second branch, an assignment that moves the end date into
* the future still matches on its destination's date.
* The reminder fires for placements whose destination ends on exactly $endDate.
*/
public function testInvoiceReminderGuardsTheDestinationFallback(): void
public function testInvoiceReminderComparesTheDestinationEndDate(): void
{
$dql = $this->invoiceQuery()->getDQL();
$this->assertStringContainsString(
'assignment.dateTo IS NOT NULL AND assignment.dateTo = :endDate',
$dql
);
$this->assertStringContainsString(
'assignment.dateTo IS NULL AND destination.dateTo = :endDate',
$dql
);
$this->assertStringContainsString('destination.dateTo = :endDate', $dql);
}
public function testInvoiceReminderOnlyJoinsTheInvoiceAndSkipsFinishedDispositions(): void