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

Remove deprecated InvalidParamException::class in branch 2.2. #19896

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Remove deprecated InvalidParamException::class in branch 2.2. #19896

merged 1 commit into from
Jul 18, 2023

Conversation

terabytesoftw
Copy link
Member

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

@what-the-diff
Copy link

what-the-diff bot commented Jul 17, 2023

PR Summary

  • Refactoring InvalidParamException
    The InvalidParamException class has been deprecated and replaced by a more context-appropriate InvalidArgumentException class.

  • InvalidArgumentException Class Definition Update
    The InvalidArgumentException class now extends the system-level \BadMethodCallException class, providing more precise error types.

  • Updating Exception Handling in Codebase
    The updates have been propagated across the project. Wherever InvalidParamException was originally used, it's now replaced by InvalidArgumentException. This includes locations in framework\base, framework\console\controllers, framework\db, framework\rbac, framework\web, and several test files.

These changes are designed to improve the code's readability, error handling, and maintainability. Now, the exceptions thrown are more appropriate to the exception circumstances, increasing the robustness of the application.

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: -1.26 ⚠️

Comparison is base (c9c100a) 66.38% compared to head (2d744fc) 65.13%.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.2   #19896      +/-   ##
============================================
- Coverage     66.38%   65.13%   -1.26%     
  Complexity    11337    11337              
============================================
  Files           429      429              
  Lines         35934    35932       -2     
============================================
- Hits          23856    23405     -451     
- Misses        12078    12527     +449     
Impacted Files Coverage Δ
framework/classes.php 0.00% <ø> (ø)
...ramework/console/controllers/FixtureController.php 0.00% <0.00%> (ø)
framework/db/BaseActiveRecord.php 73.52% <0.00%> (ø)
framework/web/ErrorHandler.php 28.93% <100.00%> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@samdark samdark merged commit 6119515 into yiisoft:2.2 Jul 18, 2023
28 of 30 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.

2 participants