fix: address code review issues

- Rename `read` column to `is_read` (PostgreSQL reserved word)
- Wrap navbar + modal in parent div for Stimulus controller scope
- Set temporary filePath before first flush in ImportController
- Use RETURNING clause for atomic incrementProcessedBatches
- Return proper empty 204 response in NotificationController

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
thibaud-leclere
2026-03-29 10:27:57 +02:00
parent b0024bbcf5
commit 6edc122ff6
6 changed files with 9 additions and 11 deletions

View File

@@ -20,13 +20,8 @@ class ImportRepository extends ServiceEntityRepository
public function incrementProcessedBatches(Import $import): int
{
$this->getEntityManager()->getConnection()->executeStatement(
'UPDATE import SET processed_batches = processed_batches + 1 WHERE id = :id',
['id' => $import->getId()]
);
return (int) $this->getEntityManager()->getConnection()->fetchOne(
'SELECT processed_batches FROM import WHERE id = :id',
'UPDATE import SET processed_batches = processed_batches + 1 WHERE id = :id RETURNING processed_batches',
['id' => $import->getId()]
);
}