Here is an initial preg_replace plugin

CommentFileSizeAuthor
#2 migrate_plus_2824696_2.patch1.32 KBLowell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lowell created an issue. See original summary.

Lowell’s picture

Status: Active » Needs work
FileSize
1.32 KB

initial plugin, no exceptions or tests included yet

heddn’s picture

Issue tags: +Needs tests

Tagging

Matroskeen’s picture

Since Drupal 9.2.0, the callback process plugin accepts unpack_source configuration property, which allows to supply multiple parameters into called function/method.

With this feature, we can use any function that accepts multiple arguments, including preg_replace.

Please take a look into the following change record for more details and examples: https://www.drupal.org/node/3205079

Matroskeen’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests

Moving to NR so maintainers can take a look.

Matroskeen’s picture

Version: 8.x-3.x-dev » 8.x-5.x-dev
Category: Task » Feature request
Status: Needs review » Reviewed & tested by the community

We can probably close this one in the same way as we did in #3051723: Include Migrate Process Trim as Plugin?.

heddn’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Yeah, I tend to agree w/ @Matroskeen here. And, while I don't like the feeling it gives me when marking "won't fix", I can't think of a better status. The suggested changes here took time and effort and were valuable at the time of their creation. But we have more options now. Hmm, let's close it as "outdated" instead. That's a better status.