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

PHPStan prepare exceptions #6037

Merged
merged 3 commits into from
Jan 15, 2024
Merged

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Jan 13, 2024

Take advantage of
https://phpstan.org/blog/bring-your-exceptions-under-control

Minimum changes to pass tooWideThrowType and implicitThrows.

Revert some mistakes from:
#5504
Preparation needed before new PRs of the same type:
#5962

Fix several wrong PHPDocs and catches:

Method ... has ...Exception in PHPDoc @throws tag but it's not thrown.

Dead catch - ...Exception is never thrown in the try block.

Take advantage of
https://phpstan.org/blog/bring-your-exceptions-under-control

Minimum changes to pass `tooWideThrowType` and `implicitThrows`.

Revert some mistakes from:
FreshRSS#5504
Preparation needed before new PRs of the same type:
FreshRSS#5962

Fix several wrong PHPDocs and catches:

> Method ... has ...Exception in PHPDoc @throws tag but it's not thrown.

> Dead catch - ...Exception is never thrown in the try block.
@Alkarex Alkarex added the System care Everything related to the system care label Jan 13, 2024
@Alkarex Alkarex added this to the 1.24.0 milestone Jan 13, 2024
Comment on lines +53 to +59
exceptions:
check:
missingCheckedExceptionInThrows: false # TODO pass
tooWideThrowType: true
implicitThrows: false
checkedExceptionClasses:
- 'Minz_Exception'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the goal of this PR

@Alkarex Alkarex merged commit 314077a into FreshRSS:edge Jan 15, 2024
2 checks passed
@Alkarex Alkarex deleted the phpstan-exceptions branch January 15, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System care Everything related to the system care
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant