Review main Merged

68664[TASK] Extract CSV output into separate functionality

Benni Mack CR +2 V +2 Hard +562 −112 updated 05/25/21, 12:08

Commit message

The CSV output of the database record list (= list module)
is one of the only parts that cannot be modified via middlewares
as its rendering directly exits PHP.

This makes it impossible to test this functionality.

This change moves the CsvExport into its own class CsvExportRecordList
which accumulates the records from the database records list.

The existing hooks are migrated and kept as is (due to the
Composition pattern).

The class is a composition for RecordList to extract
the querying logic into a separate code.

The Controller class is responsible of handling the CSV
response via the PSR-17 Response Factory.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 5