[
https://issues.apache.org/jira/browse/THRIFT-5957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Volodymyr Panivko closed THRIFT-5957.
-------------------------------------
Resolution: Fixed
> Add phpstan static analysis with CI guardrail for the PHP runtime library
> -------------------------------------------------------------------------
>
> Key: THRIFT-5957
> URL: https://issues.apache.org/jira/browse/THRIFT-5957
> Project: Thrift
> Issue Type: New Feature
> Components: PHP - Library
> Affects Versions: 0.24.0
> Reporter: Volodymyr Panivko
> Assignee: Volodymyr Panivko
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The PHP runtime library at lib/php/lib/ has no static-analysis tooling.
> Refactors and type-modernization PRs go in without an automated safety
> net to catch regressions.
> This ticket adds phpstan/phpstan ^1.12 as a require-dev dependency,
> configures it at lib/php/phpstan.neon (level 1) with a generated
> baseline that pins the current state, and wires a new lib-php-quality
> job in the GitHub Actions workflow that runs phpstan on PHP 8.3.
> The chosen level (1) catches undefined variables and obvious type
> mismatches without requiring widespread code changes. Higher levels
> will be raised in follow-up tickets as the runtime library gains
> native types and PHPDoc cleanup.
> Out of scope:
> * PSR-12 migration / php-cs-fixer (separate ticket).
> * declare(strict_types=1) and native types in lib (separate ticket).
> * Static analysis of generated PHP under test/Resources/packages/.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)