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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 62 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.

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