Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Aug 2021 at 15:49 UTC
Updated:
31 Aug 2021 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaComment #5
huzookaHmmm... so core has a test coverage for one of its documentation violation...
Comment #6
huzookaComment #7
wim leers🤯
Might I also suggest something like
to not make any change that could break anything (i.e. adding a return type would be better, but might be seen as an API change), but would have helped pinpoint this ages ago?
Comment #9
huzookaRe #7:
We obviously cannot do that, because
\Drupal\Core\Database\StatementInterface::fetchAssoc()can returnFALSEas well.Comment #10
wim leers#7: I just mean "add that assert for the return value".
Because this could theoretically still return
NULLfor example.Comment #11
huzookaRe #10:
That is impossible.
But if the actual statement's
::fetchAssoc()method returns anything else than anarrayorFALSE, then we have to fix the actual DB statement (because its interface declares that it has to return with anarrayorFALSE).Comment #12
huzookaComment #13
huzookaRelated: #3227660: MigrateExecutable::rollback incorrectly assumes MigrateMapInterface::getRowByDestination() returns an array with 'rollback_action' key.
Comment #14
wim leersAha — all good then! I have learned to not trust the database layer 🤓, but in this case that is then unwarranted!
Sorry for derailing this over a nitpick.
This patch has explicit test coverage. It is updating code to actually do what its docs say. I can't find anything else to nitpick here.
Comment #15
huzookaComment #17
catchCommitted 8dea1fb and pushed to 9.3.x. Thanks!
Comment #18
huzookaWow, that was fast!
Thank you, @catch!
Comment #19
huzookaFixing the IS.