Problem/Motivation

Here is a code snippet from \Drupal\migrate\Plugin\migrate\process\Callback source plugin:

...
* An example where the callable is a static method in a class:
 *
 * @code
 * process:
 *   destination_field:
 *     plugin: callback
 *     callable:
 *       - '\Drupal\Component\Utility\Unicode'
 *       - strtolower
 *     source: source_field
 * @endcode
...

In the example we have \Drupal\Component\Utility\Unicode::strtolower() method, which was deprecated in 8.6 and removed in 9.0 (#3091447: Remove Utility component BC layers).

Proposed resolution

Change the example method to existing method, for example \Drupal\Component\Utility\Unicode::ucfirst().

Issue fork drupal-3185528

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

Matroskeen created an issue. See original summary.

Matroskeen’s picture

Status: Active » Needs review
Issue tags: +Bug Smash Initiative, +Quick fix

Opened a merge request with a trivial single-line change. Should be pretty easy to review and commit.

Matroskeen’s picture

Pushed one more commit changing strtolower to mb_strtolower.

mikelutz’s picture

Nice catch, simple doc change. LGTM

mikelutz’s picture

Category: Bug report » Task
Status: Needs review » Reviewed & tested by the community
Matroskeen’s picture

Issue tags: -Bug Smash Initiative
quietone’s picture

@Matroskeen, yes, nice find. Thanks for the fix.

alexpott made their first commit to this issue’s fork.

  • alexpott committed c46c868 on 9.2.x authored by Matroskeen
    Issue #3185528: "Callback" process plugin has removed method in the...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Merged and cherry-picked to 9.1.x since this is a docs update.

  • alexpott committed f0bc5de on 9.1.x authored by Matroskeen
    Issue #3185528: "Callback" process plugin has removed method in the...

Status: Fixed » Closed (fixed)

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