Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generics for the event subscriber configuration arrays and adapters #2851

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Aug 18, 2024

Extracted from #2825

There is already an attempt to document the returned configs and event adapters in the event subscribers using @method annotations, but this can be quirky with IDEs (@method is read as a virtual method as an example) and there were still some baseline PHPStan issues from the existing setup. This PR formalizes that through generics by providing templates for the config and adapter interfaces and updating each listener to fill those in (where that info already exists, there are a few extensions where a type for the config still needs to be generated so a generic array is still specified).

Copy link

codecov bot commented Aug 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.84%. Comparing base (0632ab1) to head (b44e39b).
Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2851      +/-   ##
==========================================
+ Coverage   78.75%   78.84%   +0.09%     
==========================================
  Files         163      167       +4     
  Lines        8593     8638      +45     
==========================================
+ Hits         6767     6811      +44     
- Misses       1826     1827       +1     

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

@phansys phansys merged commit 146d3f4 into doctrine-extensions:main Oct 6, 2024
22 checks passed
@phansys
Copy link
Collaborator

phansys commented Oct 6, 2024

Thanks @mbabker!

@mbabker mbabker deleted the listener-generics branch October 7, 2024 02:11
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