Skip to content

Reject a getter which requires a parameter when extracting by value - #315

Merged
TomHAnderson merged 1 commit into
API-Skeletons:14.0.xfrom
TomHAnderson:hotfix/getter-parameters
Oct 3, 2026
Merged

TomHAnderson merged 1 commit into
API-Skeletons:14.0.xfrom
TomHAnderson:hotfix/getter-parameters

Conversation

@TomHAnderson

Copy link
Copy Markdown
Member

The hydrator calls the getter of every mapped field and association, exposed or not, without arguments. The getter check accepted a getter which requires a parameter, so every query of the entity's type failed, even one which did not ask for the field, as an Internal server error ("Too few arguments").

Building the type now throws Exception\Hydrator naming the field and its getter. The check covers every mapped field and association, and an entity's __call no longer skips it, as explicit getters are still called. A getter whose parameters are optional is called without them.

The hydrator calls the getter of every mapped field and association,
exposed or not, without arguments.  The getter check accepted a getter
which requires a parameter, so every query of the entity's type failed,
even one which did not ask for the field, as an Internal server error
("Too few arguments").

Building the type now throws Exception\Hydrator naming the field and its
getter.  The check covers every mapped field and association, and an
entity's __call no longer skips it, as explicit getters are still
called.  A getter whose parameters are optional is called without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (429d6c0) to head (9477065).
⚠️ Report is 1 commits behind head on 14.0.x.

Additional details and impacted files
@@             Coverage Diff             @@
##              14.0.x      #315   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity      1195      1199    +4     
===========================================
  Files             80        80           
  Lines           3227      3240   +13     
===========================================
+ Hits            3227      3240   +13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TomHAnderson
TomHAnderson merged commit a9f7d0d into API-Skeletons:14.0.x Oct 3, 2026
13 checks passed
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.

1 participant