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

Implement PHPStan tests with QIT and address errors #8754

Closed
FangedParakeet opened this issue May 2, 2024 · 1 comment · Fixed by #8814
Closed

Implement PHPStan tests with QIT and address errors #8754

FangedParakeet opened this issue May 2, 2024 · 1 comment · Fixed by #8814
Assignees
Labels
category: devops Features and tools supporting dev process. component: tests Issues related to tests focus: devops Release processes, monitoring, automations, dev tools, CI/CD pipeline priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: developer experience type: enhancement The issue is a request for an enhancement.

Comments

@FangedParakeet
Copy link
Contributor

Description

An integration with the QIT test suite was added in #6486, adding a script to the repo that runs QIT security tests. This issue is to build off this integration to add support for PHPStan tests as well.

PHPStan performs static analysis tests on the codebase: currently the PHPStan test will fail, revealing 27 errors at current count within the codebase. Many of these failures can be ignored, but several appear as if they should be addressed. Utilising this existing static code analysis tool will help to harden our codebase and once this feature is added, we can explore whether these tests can be included in any of our existing code workflows.

Acceptance criteria

  • Add working script and npm command to run QIT PHPStan tests on the WooPayments codebase.

Once this is completed in this issue, we can create a separate issue or multiple new issues to address the errors that require immediate attention. We can also begin discussing the advantages and disadvantages of including these PHPStan checks in our CI/CD workflows and, if in agreement, create another new issue to include this in our existing Git workflows and/or release process.

Designs

N/A

Testing instructions

N/A

Dev notes

QIT docs

Additional context

#6486

@FangedParakeet FangedParakeet added type: enhancement The issue is a request for an enhancement. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. component: tests Issues related to tests category: devops Features and tools supporting dev process. type: developer experience focus: devops Release processes, monitoring, automations, dev tools, CI/CD pipeline labels May 2, 2024
@timur27 timur27 self-assigned this May 2, 2024
@timur27
Copy link
Contributor

timur27 commented May 10, 2024

Please add your planning poker estimate with Zenhub @FangedParakeet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: devops Features and tools supporting dev process. component: tests Issues related to tests focus: devops Release processes, monitoring, automations, dev tools, CI/CD pipeline priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: developer experience type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants