Add declare(strict_types=1) to all Functional tests

Created on 7 November 2023, about 1 year ago
Updated 13 March 2024, 9 months ago

Problem/Motivation

This is a child issue of 🌱 [meta] Fix strict type errors in functional tests Active . After fixing strict type issues we can add the strict_types declaration to all Functional tests.

Steps to reproduce

Add to phpcs.xml.dist:

  <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
    <properties>
      <property name="spacesCountAroundEqualsSign" value="0" />
    </properties>
    <include-pattern>*/tests/src/Functional/*</include-pattern>
    <include-pattern>./tests/Drupal/FunctionalTests/*</include-pattern>
  </rule>

Run phpcs:

composer phpcs

Proposed resolution

Run phpcbf:

composer phpcbf

Remaining tasks

(DONE):

  • Most significant change is in core/phpcs.xml.dist, easiest to view the raw diff and search for that file
  • Other unusual change is bc17a2
  • As per #8 we have one final fix in 36602b
  • The rest is just applying the declaration

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.3

Component
PHPUnit 

Last updated about 9 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.71.5 2024