Needs work
Project:
Drupal core
Version:
main
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2026 at 15:42 UTC
Updated:
19 Apr 2026 at 16:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jordandukart commentedAdded a unit test for this but may be overkill given what's changing. Also was unaware that these were captured as part of the baseline for PHPStan. Removed those ignores as CI flagged it when I opened the merge request on the issue fork.
Comment #4
benjifisher@jordandukart:
Thanks for opening this issue, and starting the MR. It is always a good thing when we can remove a few lines from the PHPStan baseline! Also, this issue reinforces the lesson that PHPStan often gives good advice.
I made a few suggestions on the MR, and I see that you already accepted the first one. Back to NW for now; please change the status back to NR when you have considered the other suggestions.
In the issue summary, you reference a line in the
migration_lookupplugin that is affected by this bug:I am not sure: is that usage covered by the test that you added? If not, can we add some additional test coverage?
Comment #5
jordandukart commentedHad some discussion in Slack and added a Kernel test with a sample migration that shows this behavior. That Kernel test uncovered that the `processPipeline` call itself should also be updated as it wraps a caught MigrateException from lower in the chain but doesn't pass along properties from the caught exception.
It's a bit of an expansion of scope from the original issue being reported here but imo it's an additive change versus anything that'd break backwards compatibility. That being said, I could see why we may not want to change from the fallback value for $code even if it's present on the wrapped $exception. I added a commit adding the $previous exception as that should have no impact beyond preserving the chain. Open to discussion for or against in that regard if we wanted to set $code as well.
Comment #6
benjifisher@jordandukart, can you reply to @heddn's question on the MR? I am setting the status to NW for that.
I also added #3084708: MigrateException should pass previous exception up the chain. as a related issue. I think we can close that issue as a duplicate, but I set it to NW for now.
Comment #7
jordandukart commentedComment #8
smustgrave commented@benjifisher your thoughts on the latest changes?
Comment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #10
nod_local blip
Comment #12
benjifisherBack to NW. See my comment on the MR.