Add declare(strict_types=1) to all Kernel tests

Created on 6 November 2023, about 1 year ago
Updated 21 May 2024, 7 months ago

Problem/Motivation

This is a child issue of 🌱 [meta] Fix strict type errors in kernel tests Active . After fixing strict type issues we can add the strict_types declaration to all Kernel 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/Kernel/*</include-pattern>
    <include-pattern>./tests/Drupal/KernelTests/*</include-pattern>
  </rule>

Run phpcs:

composer phpcs

Proposed resolution

Run phpcbf:

composer phpcbf

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.3

Component
PHPUnit 

Last updated 1 day 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