The documentation for ExtensionDiscovery::scanDirectory() says:

> * Recursively scans a base directory for the requested extension type.

But the method doesn't get the extension type as a parameter, nor is it set on the class as a property.

I don't see that the method is at all aware of the extension type being currently scanned for, and looking further down that method, it looks like it scans for all extension types:

      // Determine extension type from info file.
      $type = FALSE;
      $file = $fileinfo->openFile('r');
      while (!$type && !$file->eof()) {
        preg_match('@^type:\s*(\'|")?(\w+)\1?\s*$@', $file->fgets(), $matches);
        if (isset($matches[2])) {
          $type = $matches[2];
        }
      }
      if (empty($type)) {
        continue;
      }
...
CommentFileSizeAuthor
#4 fix-method-description-2932865-4.patch611 bytesavpaderno

Comments

joachim created an issue. See original summary.

joachim’s picture

Title: incorrects in ExtensionDiscovery::scanDirectory() » incorrect docs in ExtensionDiscovery::scanDirectory()
avpaderno’s picture

Title: incorrect docs in ExtensionDiscovery::scanDirectory() » Incorrect description for ExtensionDiscovery::scanDirectory()
Issue summary: View changes
Issue tags: +Novice
avpaderno’s picture

Status: Active » Needs review
StatusFileSize
new611 bytes
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

The new description does look better, no nits to pick here.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: fix-method-description-2932865-4.patch, failed testing. View results

avpaderno’s picture

Status: Needs work » Reviewed & tested by the community

I am setting it back to r&tbtc, since the patch passed the tests. I am not sure why it is said to fail.

  • catch committed c2d7454 on 8.5.x
    Issue #2932865 by kiamlaluno, joachim: Incorrect description for...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed c2d7454 and pushed to 8.5.x. Thanks!

Status: Fixed » Closed (fixed)

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