Repository navigation
Improve phpstan level #143
Copy link
Copy link
Open
Labels
Description
Activity
- added 4 commits that reference this issue
on Oct 9, 2026 njoubert-cleverage commented
on Oct 9, 2026 MemberAuthorMore actionsProgress
Current state on
main: PHPStan level 7, noignoreErrors, no@phpstan-ignore.Done
- Remove all
ignoreErrorsand@phpstan-ignore-*comments, level 6 clean — #143 - Remove all PHPStan ignores at level 6 #238 - Level 6 → 7, plus every level 8 error that can be fixed without breaking backward compatibility — #143 - Improve PHPStan level from 6 to 7 #252
- Type the remaining untyped task options (
split_character,write_headers,log_empty_lines) — #143 - Type the remaining untyped task options #254
Edge cases found along the way were fixed and tested (e.g.
InputIteratorTaskwith a nestedIteratorAggregate,CsvResourceblank header line,XpathEvaluatorTransformerinvalid query / namespace nodes,SlugifyTransformerinvalid UTF-8).Planned for v6.0 (draft PRs)
- Level 7 → 8: the 16 remaining errors come from native nullable types that are never
nullin practice (AbstractConfigurableTask::getOptions(): ?array,ProcessState::getContextualizedOptions(): ?array,CsvResource::$lineNumber,ProcessHistory::$startDate). Narrowing them is a BC break — [v6] #143 - Narrow nullable native types, improve PHPStan level to 8 #253 (milestone v6.0) - cleverage/process-bundle#143 - ZipTask and UnzipTask: compatibility with process-bundle v6.0 archive-process-bundle#24 (milestone v2.3):
ZipTask/UnzipTaskoverridegetOptions(): ?array, fatal with [v6] #143 - Narrow nullable native types, improve PHPStan level to 8 #253. Compatible with v5 and v6, must be released before process-bundle v6.0
Next (v6.x, no BC expected)
- Levels 9 and 10: ~500 errors, mostly
mixedvalues read from$options[...]. The analysis on the v6 branch shows they can all be fixed with PHPDoc and local type narrowing, without changing native signatures, so they do not require another major version.
- Remove all
Description
Requirements
Breaking changes