Skip to content

fix: drop @internal annotation from InputField#795

Merged
oojacoboo merged 1 commit intothecodingmachine:masterfrom
oojacoboo:fix/drop-internal-from-inputfield
Apr 19, 2026
Merged

fix: drop @internal annotation from InputField#795
oojacoboo merged 1 commit intothecodingmachine:masterfrom
oojacoboo:fix/drop-internal-from-inputfield

Conversation

@oojacoboo
Copy link
Copy Markdown
Collaborator

Closes #761.

Problem

InputField is marked @internal, but userland cannot avoid referencing it: the public InputFieldMiddlewareInterface::process() method signature returns InputField|null, so any middleware implementation must import and return InputField directly.

public function process(
    InputFieldDescriptor $inputFieldDescriptor,
    InputFieldHandlerInterface $inputFieldHandler,
): InputField|null;

The @internal marker contradicts that public-API contract and causes static analysis tooling to flag legitimate middleware implementations.

Fix

Drop the @internal line from the InputField class docblock. The class is already final, which keeps its inheritance contract locked down; removing @internal just acknowledges that the type is part of the public surface reachable through the middleware interface.

Note: the sibling QueryField class retains @internal because FieldMiddlewareInterface::process() returns the parent FieldDefinition, not QueryField — userland middleware never needs to name QueryField directly.

The InputFieldMiddlewareInterface::process() method returns InputField|null,
meaning userland middleware implementations must reference this class
directly. Marking it @internal contradicts that public-API contract.

Closes thecodingmachine#761
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.73%. Comparing base (53f9d49) to head (9bef07a).
⚠️ Report is 145 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #795      +/-   ##
============================================
- Coverage     95.72%   94.73%   -0.99%     
- Complexity     1773     1832      +59     
============================================
  Files           154      172      +18     
  Lines          4586     4808     +222     
============================================
+ Hits           4390     4555     +165     
- Misses          196      253      +57     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@oojacoboo oojacoboo merged commit 7766cdb into thecodingmachine:master Apr 19, 2026
13 checks passed
@oojacoboo oojacoboo deleted the fix/drop-internal-from-inputfield branch April 19, 2026 01:58
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.

Drop "@internal" annotation from the InputField class

2 participants