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 a PHPStan configuration and run it as a GitHub Action #808

Merged
merged 7 commits into from
Sep 27, 2024

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Sep 26, 2024

Description of the Change

This PR adds in PHPStan as a dev dependency, along with the configuration to run that and a GitHub Action Workflow that will run on all PRs. I've also fixed up all issues that have been reported.

Right now I have this set to level 1 (lowest is 0, highest is 9). If I change this to level 2, there are 85 new things that get flagged (though most look to be pretty similar so solving a few should solve most of them). Ideally we bump this up to a higher level but I think starting at 1 is better than nothing.

How to test the Change

Verify the PHPStan Action runs and passes on this PR

Changelog Entry

Fixed - Addressed all issues raised by running PHPStan
Developer - Added PHPStan into our workflow with the ability to run that locally and in a GitHub Action

Credits

Props @dkotter

Checklist:

@dkotter dkotter added this to the 3.2.0 milestone Sep 26, 2024
@dkotter dkotter marked this pull request as ready for review September 26, 2024 23:57
@dkotter dkotter requested review from jeffpaul and a team as code owners September 26, 2024 23:57
@github-actions github-actions bot added the needs:code-review This requires code review. label Sep 26, 2024
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @dkotter. LGTM.

@iamdharmesh iamdharmesh merged commit 26e2a30 into develop Sep 27, 2024
17 of 18 checks passed
@iamdharmesh iamdharmesh deleted the feature/phpstan branch September 27, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants