Typehint test setUp() methods

Created on 27 June 2020, over 4 years ago
Updated 18 June 2023, over 1 year ago

Problem/Motivation

All of our tests now throw this warning when you test them on 9.0.x and up:

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\entitygroupfield\FunctionalJavascript\EntityGroupFieldWidgetTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724

Proposed resolution

It looks like PHP return type hints are allowed as of PHP7. We require core 8.8, which requires PHP 7.0.8 and up. So I *think* we're safe to do this now.

Remaining tasks

  1. Make sure they work on all versions of PHP we care about.
  2. Commit.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dww

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024