Declaring all PHP files as strict typed will prevent PHP from coercing types, thus potentially catching errors and implicit assumptions early.

This will require adding declare(strict_types=1); right after the opening <?php like so:

<?php

declare(strict_types=1);

...

Once that's done, it may surface some errors, which might require some (hopefully) minimal work to fix.

This should be done before #3305735: Type hint method/function parameters, return types, and class properties.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Ambient.Impact created an issue. See original summary.

ambient.impact’s picture

Issue summary: View changes
ambient.impact’s picture

Assigned: Unassigned » ambient.impact

ambient.impact’s picture

Assigned: ambient.impact » Unassigned
Status: Active » Needs review
ambient.impact’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.