Problem/Motivation

The class doc block in Drupal\migrate\Plugin\migrate\source\SourcePluginBase includes these lines:

 * - The row needs an update.
 *   - Rows can be marked by custom or contrib modules using the
 *     \Drupal\migrate\Plugin\MigrateIdMapInterface::prepareUpdate() os
 *     \Drupal\migrate\Plugin\MigrateIdMapInterface::setUpdate()
 *     methods.

The word "os" should be "or".

Further down, there is this code example:

 * @code
 * source:
 *   plugin: some_source_plugin_name
 *   constants:
 *     - foo: bar
 * process:
 *   baz: constants/bar
 * @endcode
 *
 * In this example, the constant 'foo' is defined with a value of 'bar'. It is
 * later used in the process pipeline to set the value of the field baz.

There are two problems here:

  • The line * - foo: bar should be just * foo: bar (no -). Thanks to @abramley for catching this mistake.
  • The line * baz: constants/bar should be * baz: constants/foo.

Proposed resolution

Make the requested changes.

Remaining tasks

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

N/A

Issue fork drupal-3500774

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:

Comments

benjifisher created an issue. See original summary.

kul.pratap’s picture

Assigned: Unassigned » kul.pratap

kul.pratap’s picture

Assigned: kul.pratap » Unassigned
Status: Active » Needs review
benjifisher’s picture

Status: Needs review » Reviewed & tested by the community

@kul.pratap:

Thanks for making the changes I suggested!

I see that you have several contribution credits already, but none yet for Drupal core. Maybe this will be your first. Good luck, and I hope you keep contributing!

I reviewed the changes in the MR, and they do what I requested in the issue summary. These changes are all on comment lines (the class doc block) so there is no need for testing.

Once these changes are merged into the 11.x branch, we should see them in the API docs: https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Plugi....

  • quietone committed 8768d638 on 11.1.x
    Issue #3500774 by kul.pratap, benjifisher: Fix errors in...

  • quietone committed c6bc6ebf on 11.x
    Issue #3500774 by kul.pratap, benjifisher: Fix errors in...
quietone’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

I forget how often but api.drupal.org isn't updated daily.

Committed c6bc6eb and pushed to 11.x. Cherry picked to 11.1.x

Thanks!

kul.pratap’s picture

@benjifisher Thank you for reviewing and for your kind words! I’m excited to contribute to Drupal core, and I appreciate your guidance. Looking forward to making more contributions!
@quietone Thank you merging.

Status: Fixed » Closed (fixed)

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