- Issue created by @megachriz
- 🇨🇦Canada joelpittet Vancouver
I love the simplification here — big +1 from me.
One thing I’m wondering about: with the new approach, if a plugin throws an exception during clean(), it looks like the remaining plugins won’t be called. Previously, each plugin’s clean was isolated inside its own listener. Is that an intentional change, or should we consider wrapping each plugin’s call in its own try/catch? I think the answer is that the catches happen deeper anyways so not a concern but thought I'd ask anyway.
Also, is there any risk that one plugin’s clean() call could mutate shared state on the feed in a way that affects how later plugins behave within the same loop?
- 🇳🇱Netherlands megachriz
@joelpittet
Good catch about the exception throwing duringclean()
. I think if one of the plugins throws an exception, the remaining plugins should still be called. I have adjusted this. (In practice, only the processor plugin in Feeds implements CleanableInterface, but in theory, there could exist contributed modules that implement it for the other plugins).Also, is there any risk that one plugin’s clean() call could mutate shared state on the feed in a way that affects how later plugins behave within the same loop?
Yes, each
clean()
receives the same state object, so they could manipulate that. I'm not sure yet if that is a concern. At least, that behavior doesn't change with the code changes.