Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
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
Comment #3
Wongjn CreditAttribution: Wongjn as a volunteer commentedComment #4
Wongjn CreditAttribution: Wongjn as a volunteer commentedComment #7
heni_deepak CreditAttribution: heni_deepak commentedI 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
Comment #8
alexpott+1 on improving this. But let's go one step further and describe the shape of the object too. See comment in gitlab.
Comment #10
lucasscShape of the object described as suggested in #8.
Comment #11
lucasscMR rerolled.
Comment #12
sophiavs CreditAttribution: sophiavs at CI&T commentedI'll do the review
Comment #13
sophiavs CreditAttribution: sophiavs at CI&T commentedIt's really good for me, the texts explains correctly what is the return.
Comment #14
alexpottCommitted 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.