Implement PHPStan tests with QIT and address errors #8754
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.
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
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
The text was updated successfully, but these errors were encountered: