Skip to content

Absorb fetch pipeline from AbstractMapper, remove style tests#95

Merged
alganet merged 1 commit intomasterfrom
concrete-sql-mapper
Mar 15, 2026
Merged

Absorb fetch pipeline from AbstractMapper, remove style tests#95
alganet merged 1 commit intomasterfrom
concrete-sql-mapper

Conversation

@alganet
Copy link
Member

@alganet alganet commented Mar 15, 2026

Add concrete fetch() and fetchAll() to Mapper, absorbing the full SQL pipeline that was removed from AbstractMapper. All pipeline methods (createStatement, fetchHydrated, parseHydrated, fetchSingle, fetchMulti) are now private implementation details.

Remove all style tests and style entity stubs, naming convention tests and integration tests now live in Data with InMemoryMapper. MapperTest already covers typed entity fetch/persist with the default Standard style.

Add concrete fetch() and fetchAll() to Mapper, absorbing the
full SQL pipeline that was removed from AbstractMapper. All
pipeline methods (createStatement, fetchHydrated, parseHydrated,
fetchSingle, fetchMulti) are now private implementation details.

Remove all style tests and style entity stubs, naming convention
tests and integration tests now live in Data with InMemoryMapper.
MapperTest already covers typed entity fetch/persist with the
default Standard style.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR relocates the SQL fetch pipeline into Respect\Relational\Mapper by adding concrete fetch() / fetchAll() implementations, and simplifies the test suite by removing per-style tests and moving inline stub entities into dedicated stub files.

Changes:

  • Add Mapper::fetch() and Mapper::fetchAll() and make the underlying pipeline helpers private implementation details.
  • Remove tests/Styles/* tests (style/integration coverage moved elsewhere per PR description).
  • Extract inline test stub entities from MapperTest / DbTest into tests/Stubs/* and update dev autoload + tooling config accordingly.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Mapper.php Introduces public fetch() / fetchAll() and internalizes statement/hydration/parsing helpers as private methods.
tests/MapperTest.php Removes inline stub entity class definitions (now loaded from tests/Stubs).
tests/DbTest.php Removes inline fetch stub classes (now loaded from tests/Stubs).
tests/Stubs/* Adds dedicated stub entity classes used by the test suite (including OtherEntity/*).
tests/Styles/*.php Removes style-specific tests from this repository.
composer.json Updates autoload-dev PSR-4 mappings to include the new stub locations.
phpcs.xml.dist Applies the Respect ruleset directly (previous deferrals removed) while keeping the tests variable-name exclusion.
phpstan.neon.dist Removes an ignore rule for duplicate array keys (no longer needed with removed tests).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@alganet alganet marked this pull request as ready for review March 15, 2026 06:03
@alganet alganet merged commit 19b7a04 into master Mar 15, 2026
6 checks passed
@alganet alganet deleted the concrete-sql-mapper branch March 15, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants