Problem/Motivation

In file core/tests/Drupal/Tests/TestFileCreationTrait.php, for the getTestFiles() function, it uses incorrect @return type documentation of array[]. It returns an array of objects, provided by Drupal\Core\File\FileSystemInterface::scanDirectory().

Proposed resolution

Change the @return type to object.

Remaining tasks

  • Make a patch ✅

Issue fork drupal-3231694

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

Wongjn created an issue. See original summary.

Wongjn’s picture

Status: Active » Needs review
Wongjn’s picture

Issue summary: View changes

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

heni_deepak’s picture

Status: Needs review » Reviewed & tested by the community

I have checked and also find issue in auto test. I think it need to commit.
Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest

patch fail based on return type.
https://www.drupal.org/pift-ci-job/2486882

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

+1 on improving this. But let's go one step further and describe the shape of the object too. See comment in gitlab.

lucassc made their first commit to this issue’s fork.

lucassc’s picture

Assigned: Wongjn » Unassigned
Status: Needs work » Needs review

Shape of the object described as suggested in #8.

lucassc’s picture

MR rerolled.

sophiavs’s picture

Assigned: Unassigned » sophiavs

I'll do the review

sophiavs’s picture

Assigned: sophiavs » Unassigned
Status: Needs review » Reviewed & tested by the community

It's really good for me, the texts explains correctly what is the return.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 9ee0ef6463 to 10.1.x and f425d4eb29 to 10.0.x and 6a268be385 to 9.5.x. Thanks!

Backported to 9.5.x as a docs fix.

  • alexpott committed 9ee0ef6 on 10.1.x
    Issue #3231694 by Wongjn, lucassc, alexpott: TestFileCreationTrait::...

  • alexpott committed f425d4e on 10.0.x
    Issue #3231694 by Wongjn, lucassc, alexpott: TestFileCreationTrait::...

  • alexpott committed 6a268be on 9.5.x
    Issue #3231694 by Wongjn, lucassc, alexpott: TestFileCreationTrait::...

Status: Fixed » Closed (fixed)

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