Skip to content

feat: generic types for DI classes #20354

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

Merged
merged 6 commits into from
Apr 24, 2025

Conversation

max-s-lab
Copy link
Contributor

@max-s-lab max-s-lab commented Apr 17, 2025

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues

Recently I was trying to increase PHPStan level in a Yii2 based project and came across some errors due to Instance and Container classes. When I checked the repository I saw that Container class was recently updated but it seems to have some errors. I would like to fix them. I also want to add some new annotations to Instance::ensure

Example

Before changes

image

After changes

image

Copy link

codecov bot commented Apr 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.85%. Comparing base (7037fd4) to head (56cbd05).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20354   +/-   ##
=========================================
  Coverage     64.85%   64.85%           
  Complexity    11445    11445           
=========================================
  Files           431      431           
  Lines         37208    37208           
=========================================
  Hits          24132    24132           
  Misses        13076    13076           

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

@max-s-lab max-s-lab marked this pull request as ready for review April 17, 2025 10:38
@max-s-lab max-s-lab requested a review from xepozz April 22, 2025 10:24
@samdark samdark merged commit f046f24 into yiisoft:master Apr 24, 2025
86 checks passed
@samdark
Copy link
Member

samdark commented Apr 24, 2025

Thank you!

@samdark samdark added this to the 2.0.53 milestone Apr 24, 2025
@max-s-lab max-s-lab deleted the di-classes-generics branch April 24, 2025 09:31
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.

5 participants