Problem/Motivation

Per https://www.drupal.org/project/drupal/releases/10.2.0:

Drupal core automated tests and test APIs are being converted to require strict typing in all cases. So far, Drupal core test traits, build tests, and functional JavaScript tests all require strict typing. Going forward, all Drupal core tests will require strict typing. It is recommended that contributed and custom projects use the Drupal standard for strict type declaration.

Proposed resolution

1. Add strict type checking following the coding standard defined in https://www.drupal.org/node/3402544 to all PHPUnit test files.
2. Run the tests. If any fail due to this new martinet, rework the code in the module to properly provide strict typing. This usually will mean that variables in PHP classes need to have type hints. A multitude of examples of these types of fixes can be found by reviewing the code changes in issues linked to from #3376057: [META] Add declare(strict_types=1) to all tests . A more bite-sized model can be found in #3405359: declare strict_types in Pathologic.

This module uses Gitlab CI for automated testing of proposed code changes. To contribute code changes, create a merge request. Patch files will not trigger automated testing and are not sufficient for review.
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

mark_fullmer created an issue. See original summary.

  • mark_fullmer authored 3b358110 on 1.1.x
    Issue #3412192 by mark_fullmer: Add strict typing for AddToCalendar Date...
mark_fullmer’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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