With PHP it's possible to enable strict types with declare(strict_types=1); which causes an exception when the code in the file containing that line calls a function/method without respecting its arguments types.

In the Drupal 9.x branch, we should enable it.

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno created an issue. See original summary.

pmagunia made their first commit to this issue’s fork.

pmagunia’s picture

Status: Active » Needs review

  • apaderno committed ad1baa2 on 2.0.x authored by pmagunia
    Issue #3257961 by pmagunia: Enable strict types for PHP files
    
apaderno’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

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