missing @return in docs for ExternalEntityStorageClientInterface::query()

Created on 24 July 2023, over 1 year ago
Updated 21 February 2024, 10 months ago

Problem/Motivation

The method is missing a @return.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Documentation

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

  • Issue created by @joachim
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass
  • 🇮🇳India sidharth_soman Bangalore

    I've added the @return doc comment. Please review.

  • 🇬🇧United Kingdom joachim

    Thanks for the patch!

    I'm not sure each item has to be an array, as one of the callers of this method does this:

        $query_results = $this->getStorageClient()->query($this->parameters, $this->sort, $start, $length);
    
    SNIP 
    
        foreach ($query_results as $query_result) {
    
          $id = $field_mapper->extractIdFromRawData((array) $query_result);
    
  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi,

    Patch #2 was applied cleanly to the External Entities module against 8.x-2.x-dev on Drupal 9.5.10, and confirmed that the ExternalEntityStorageClientInterface.php is now updated.

    Checking patch src/StorageClient/ExternalEntityStorageClientInterface.php...
    Applied patch src/StorageClient/ExternalEntityStorageClientInterface.php cleanly.

    Please see the attached files for reference.

    I'm moving this now to RTBC.

    Thank you!

  • Status changed to Needs work over 1 year ago
  • 🇬🇧United Kingdom joachim

    Needs work as per my comment.

    @roberttabigue thanks for reviewing, but please don't upload screenshots of code! We can see the patch applies - the test is green. And we can see the change the patch makes -- that's what the diff is for.

  • Assigned to imustakim
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass
  • 🇨🇦Canada imustakim Canada

    Patch updated.
    Please review.

  • Status changed to Needs work over 1 year ago
  • 🇬🇧United Kingdom joachim
    +++ b/src/StorageClient/ExternalEntityStorageClientInterface.php
    @@ -77,6 +77,9 @@ interface ExternalEntityStorageClientInterface extends PluginInspectionInterface
    +   *   A single external entity or array of raw data arrays each representing an external entity.
    

    It can't be a single entity, because:

        $query_results = $this->getStorageClient()->query($this->parameters, $this->sort, $start, $length);
        $field_mapper = $this->getExternalEntityType()->getFieldMapper();
        $result = [];
        foreach ($query_results as $query_result) {
          $id = $field_mapper->extractIdFromRawData((array) $query_result);
          if (!empty($id)) {
            $result[$id] = $id;
          }
        }
    
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    2 pass
  • 🇮🇳India sourabhjain

    Updated patch as issue mentioned in #8. Please review.

  • Status changed to RTBC over 1 year ago
  • 🇵🇭Philippines roberttabigue

    Hi,

    I reviewed the changes and it looks good on my end.

    Moving this now to RTBC.

    Thank you!

  • Status changed to Fixed 11 months ago
  • 🇳🇱Netherlands pefferen

    Thanks for the work

  • 🇮🇳India sourabhjain

    @pefferen I don't see you haven't given credit to anyone apart from you. Is there any specific reason?

  • Status changed to Fixed 11 months ago
  • 🇳🇱Netherlands pefferen

    No specific reason, I just forgot to set it properly, thanks for checking :)

  • 🇨🇦Canada joseph.olstad

    @pefferen, it is normal to wait two weeks and let drupal.org automatically close issues. Now that you have force closed this issue no one else can re-open it should there be a regression to report.

    When an issue is marked as Fixed and has no activity for 2 weeks, it is closed automatically.

  • Status changed to Fixed 11 months ago
  • 🇳🇱Netherlands pefferen

    thanks, @josepholstad I did not know, reopening to fixed

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

Production build 0.71.5 2024