Fix strict type errors detected by phpstan

Created on 26 November 2023, 7 months ago
Updated 18 January 2024, 5 months ago

Problem/Motivation

Before we can add declare(strict_types=1) to existing code we need to fix strict type errors. We can detect some of these with phpstan, via the FunctionCallParametersCheck rule.

Steps to reproduce

To activate the FunctionCallParametersCheck rule we can add the following parameter to phpstan.neon.dist:

parameters:
  checkFunctionArgumentTypes: true

Since we have 📌 Add declare(strict_types=1) to all tests Needs work we can exclude tests:

parameters:
  excludePaths:
    - tests
    - */tests/*

Proposed resolution

Review detected errors and fix them. Possibly convert this to a meta and open child issues.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Other  →

Last updated about 3 hours ago

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024