Problem/Motivation

This is a child issue of #3376057: [META] Add declare(strict_types=1) to all tests.

Steps to reproduce

Add to phpcs.xml.dist:

  <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
    <properties>
      <property name="spacesCountAroundEqualsSign" value="0" />
    </properties>
    <include-pattern>./tests/Drupal/*.php</include-pattern>
    <include-pattern>./tests/TestSuites/*</include-pattern>
    <include-pattern>./modules/system/src/Tests/Routing/*</include-pattern>
    <!-- Add exclude patterns here for paths covered by other in progress issues -->
  </rule>

Run phpcs:

composer phpcs

Proposed resolution

Run phpcbf:

composer phpcbf

Remaining tasks

Review changes in these files (MR !6004):

  • core/modules/field/tests/src/Functional/NestedFormTest.php
  • core/tests/Drupal/TestTools/Random.php

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#21 3407793-nr-bot.txt15.69 KBneeds-review-queue-bot

Issue fork drupal-3407793

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:

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review
mstrelan’s picture

Status: Needs review » Postponed

Postponed on fixing the fails which will happen in another issue that's yet to be created

mstrelan changed the visibility of the branch 3407793-strict-types-misc-fix to hidden.

mstrelan’s picture

Issue summary: View changes
Status: Postponed » Needs review

Since there are only two small fixes maybe we can do this all in a single issue. The two files with fixes to review are:

  • core/modules/field/tests/src/Functional/NestedFormTest.php
  • core/tests/Drupal/TestTools/Random.php
smustgrave’s picture

Status: Needs review » Needs work

Have not reviewed

Seems to have a number of test failures spread out.

mstrelan’s picture

Status: Needs work » Needs review

See #7, I think we can fix errors and apply the statement in the one issue here since the fixes are literally only two words. So MR 6004 is the green one and the files with the fixes are listed in the IS.

smustgrave changed the visibility of the branch 3407793-strict-types-misc to hidden.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Oh that MR looks fine to me then.

quietone’s picture

Status: Reviewed & tested by the community » Needs review

I left a question

mstrelan’s picture

Question answered, not sure if I can set back to RTBC so leaving NR.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Restoring status as question is answered.

  • larowlan committed 2a232304 on 11.x
    Issue #3407793 by mstrelan: Add declare(strict_types=1) to all...
larowlan’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 11.x

Moving to 10.2.x for backport

mstrelan’s picture

Status: Patch (to be ported) » Needs review

Backported to 10.2.x minus the change to phpcs.xml.dist

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Reroll for 10.2 seems good.

mstrelan’s picture

Nightwatch seems to be failing and I don't know how to interpret the output.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new15.69 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mstrelan’s picture

Status: Needs work » Reviewed & tested by the community

Rebased and nightwatch passing now. Back to RTBC as per #19.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed d7e0df2 and pushed to 10.2.x. Thanks!

  • longwave committed d7e0df28 on 10.2.x
    Issue #3407793 by mstrelan: Add declare(strict_types=1) to all...

Status: Fixed » Closed (fixed)

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