Problem/Motivation

API page: https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Row.p...

> array An array of source plugins.

The return is not an array of plugins, but the array of source values.

Steps to reproduce

N/A

Proposed resolution

Change method short comment to "Retrieves all source properties." To be consistent with method ->getSourceProperty()
Change @return description to "An array containing all source property values, keyed by the property name."

Remaining tasks

Commit

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3251835

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

joachim created an issue. See original summary.

beatrizrodrigues’s picture

Assigned: Unassigned » beatrizrodrigues

I'll fix the @return doc.

beatrizrodrigues’s picture

Assigned: beatrizrodrigues » Unassigned
Status: Active » Needs review

I did the MR, I hope it fits. Thanks

joachim’s picture

Thanks for the patch!
LGTM; I'll ask the migrate maintainer to confirm.

mikelutz’s picture

Status: Needs review » Needs work

Most other places in the Row class documentation, we refer to source 'properties' rather than values. Let's go with "An array containing all source property values, keyed by the property name."

mikelutz’s picture

Lets tweak *Returns the whole source array." to "Retrieves all source properties." while we are in there, to more closely align with the 'getSourceProperty' method above it.

beatrizrodrigues’s picture

Status: Needs work » Needs review

I did the fixes that you reported @mikelutz Thank you so much for the feedback.

mikelutz’s picture

Status: Needs review » Needs work

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.

beatrizrodrigues’s picture

Assigned: Unassigned » beatrizrodrigues

ohh! I didn't know that @mikelutz, I was actually in doubt about where should do the split in the test. Thank you for share this information with me. I'll fix that.

beatrizrodrigues’s picture

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

Splited the line in the place that was suggested. I run phpcs and everything looks fine. Please, Review. Thanks

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Looks perfect! Thanks everyone!

> I was actually in doubt about where should do the split in the test.

BTW, most text editors and IDEs should have a function to automatically rewrap comment text for you. E.g. for VSCode there's the rewrap plugin.

mikelutz’s picture

Title: Incorrect @return docs for Row::getSource() » [documentation] Fix incorrect @return docs and description for Row::getSource()
Component: documentation » migration system
Category: Bug report » Task
Issue summary: View changes
Priority: Normal » Minor
Issue tags: -migrate +Documentation

Much better. Thanks!

Tweaking the issue description and tags. For future reference, this issue should be in the migration component with a tag of documentation to get the attention of migration maintaiers, instead of being in the documentation component and being tagged as 'migrate'. The migrate tag is not a standard one we use or look for, and the documentation component is really more for online documentation change requests, rather than in code comment and phpdoc changes.

beatrizrodrigues’s picture

Oh, thanks @joachim. I will use it from now. I was not aware of this plugin existence.

joachim’s picture

Component: migration system » documentation
Issue tags: -Documentation

> The migrate tag is not a standard one we use or look for,

I'd previously seen someone from the migrate team (possibly @quietone?) tag a documentation issue with this tag. At least I think it was this tag. It was definitely a tag!

> and the documentation component is really more for online documentation change requests, rather than in code comment and phpdoc changes.

That's not correct at all. If you look at an api.d.o page such as https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Row.p... and follow the 'file an issue' link, it takes you to a new issue form and prefills the 'component' as 'documentation'. The 'documentation' tag is, AFAIK a relic from years ago and unless the documentation team have changed their guidelines, should not be used.

mikelutz’s picture

Component: documentation » migration system
Issue tags: +Documentation

> That's not correct at all. If you look at an api.d.o page such as https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Row.p... and follow the 'file an issue' link, it takes you to a new issue form and prefills the 'component' as 'documentation'.

Yes, filing an issue on any documentation page will default to the 'documentation' component, but as I said, that is not correct for this issue.

> I'd previously seen someone from the migrate team (possibly @quietone?) tag a documentation issue with this tag. At least I think it was this tag. It was definitely a tag!

While I can't speak to that, I can assure you that as we look through the migration issue queue, and tally up statistics, we use the migration component filter, not tags. This issue is correctly placed in the migration system component.

quietone’s picture

It is very likely me adding the documentation tag and moving issues to the migration system because that is where the migrate maintainers work.

As I understand Selecting the Project for a documentation issue issue should be in the documentation component. But then my question is 'how do sub-system maintainers find documentation issues about their component(s)'? Presumably one adds a tag for the component and then maintainers need to do, at least, two searches to find everything related to their sub-system. In some ways, that is fine. I just would like to know what is expected, they are grey areas here.

quietone’s picture

Title: [documentation] Fix incorrect @return docs and description for Row::getSource() » Fix incorrect @return docs and description for Row::getSource()

Hopefully improving the title by removing '[documentation]' since there is 'docs' later on.

alexpott’s picture

Version: 9.4.x-dev » 9.3.x-dev
Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Committed and pushed 2a68e8f22c4 to 10.0.x and dbca2fc0e2b to 9.4.x and 90bd6795ae7 to 9.3.x. Thanks!

  • alexpott committed 2a68e8f on 10.0.x
    Issue #3251835 by beatrizrodrigues, joachim, mikelutz, quietone: Fix...

  • alexpott committed dbca2fc on 9.4.x
    Issue #3251835 by beatrizrodrigues, joachim, mikelutz, quietone: Fix...

  • alexpott committed 90bd679 on 9.3.x
    Issue #3251835 by beatrizrodrigues, joachim, mikelutz, quietone: Fix...

Status: Fixed » Closed (fixed)

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