if (!$storage_comparer->createChangelist()->hasChanges()) {
$form_state->setErrorByName('import', $this->t('There are no changes to import.'));
}
else {
This reads badly and is poor DX. Callling createChangelist() is an essential step in setting up the $storage_comparer. If you don't to it, you get errors when you try to do the config import.
But that code makes it look like it's just something that's necessary for checking for changes.
The call to createChangelist() should be moved to its own separate line here and in several other places in the config module.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3123472-6.patch | 2.34 KB | neslee canil pinto |
| #2 | 3123472-2.patch | 2.42 KB | neslee canil pinto |
Comments
Comment #2
neslee canil pintoComment #3
longwaveI am not sure this makes the difference any more visible. How about:
Comment #4
joachim commentedThat was what I had in mind.
Comment #5
longwaveComment #6
neslee canil pintoComment #7
joachim commentedThat's perfect, thanks!
Comment #9
catchCommitted 81c6dc6 and pushed to 9.1.x. Thanks!