Migration process plugin for SmartTrim logic

Created on 23 January 2025, 2 months ago

Problem/Motivation

When building migrations it would be really useful to be able to use SmartTrim's functionality for extracting trimmed versions of e.g. body fields for other uses.

Proposed resolution

Provide a process plugin.

Remaining tasks

Do the work =)

User interface changes

n/a

API changes

TBD

Data model changes

n/a

Feature request
Status

Active

Version

2.2

Component

Code

Created by

🇺🇸United States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @DamienMcKenna
  • Merge request !103WIP process plugin. → (Open) created by DamienMcKenna
  • Pipeline finished with Failed
    2 months ago
    Total: 216s
    #404032
  • First commit to issue fork.
  • Pipeline finished with Failed
    2 months ago
    Total: 299s
    #404046
  • Pipeline finished with Failed
    2 months ago
    Total: 379s
    #404062
  • 🇮🇪Ireland lostcarpark

    The new trait is a neat way of providing the trim functionality for both the formatter and the process plugin. However, it was missing a use statement in the classes to actually implement the trait. I renamed it to SmartTrimTrait, as SmartTrim was conflicting with the name of the SmartTrim plugin.

    Should the input and output of the trim() method be typed? I considered giving it a string type, but I wasn't certain it would always be a string.

    Does it need a test of the migration?

    Also note currently PHPstan (next minor) is failing. The failure is in the TruncateHTML class, which hasn't been changed by this issue, so I think it's caused by an upstream change, so I think it should be looked at by a separate issue.

  • 🇺🇸United States markie Albuquerque, NM

    We also might be able to replace the TruncateHTML file with the trait... That file probably needs a lot of clean out anyway.

  • 🇺🇸United States DamienMcKenna NH, USA

    Thanks for the fixes, lostcarpark!

  • 🇺🇸United States ultimike Florida, USA
Production build 0.71.5 2024