Skip to content

fix(task) #32 #33 #34 #35 #36 entity_manager option, readers re-executed for each input, table optional with sql, null input errors, lazy hydration - #37

Merged
njoubert-cleverage merged 1 commit into
mainfrom
32
Oct 2, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
32

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #32.
Fixes #33.
Fixes #34.
Fixes #35.
Fixes #36.

Grouped in one PR because the fixes change the same tasks, tests, reference pages and the CHANGELOG Latest section (separate PRs would conflict).

Tests

  • DatabaseReaderTaskSqliteTest (new): DatabaseReaderTask on an in-memory SQLite database, iterating as the process manager does. It covers table, sql without table, neither of them, three inputs, pagination with two inputs, input_as_params, and an ArrayParameterType parameter.
  • AbstractDoctrineTaskTest (new): entity manager selection, through DoctrineWriterTask.
  • DoctrineReaderTaskTest: entities hydrated while iterating, query executed again for each input.
  • Existing tests: states now give their (empty) options; null input messages.

54 tests; the new ones fail without the fix (11 errors / failures). The 2 PHPUnit deprecations were already reported on main.

Documentation: entity_manager option of every EntityManager task, table option, notes of both readers (the "executed once per process run" limitation is removed, memory usage of DoctrineReaderTask), index.md, export cookbook (no more table placeholder with sql).

Checked with process-bundle-demo (see the demo PR):

Process Before After
demo.doctrine.database.read_multiple_inputs 6 rows + Empty resultset 9 rows
demo.doctrine.entitymanager.reader_multiple_inputs 6 entities + Empty resultset 9 entities
demo.doctrine.database.read_sql_without_table The required option "table" is missing. 3 rows
demo.doctrine.entitymanager.reader_entity_manager (entity_manager: 'unknown') entities read with the default entity manager Doctrine ORM Manager named "unknown" does not exist.
demo.doctrine.entitymanager.detacher_null_input DoctrineWriterTask does not allow null input DoctrineDetacherTask does not allow null input
demo.doctrine.entitymanager.remover_null_input get_class(): Argument #1 ($object) must be of type object, null given DoctrineRemoverTask does not allow null input
demo.doctrine.database.read, read_paginate 3 rows / 2 pages unchanged

demo.doctrine.database.read_array_parameter also validates the !php/enum Doctrine\DBAL\ArrayParameterType::… example of database_reader_task.md with DBAL 4.4.

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

🤖 Generated with Claude Code

… again for each input, table optional with sql, null input errors, entities hydrated while iterating

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 873e57d into main Oct 2, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment