Added key blacklist when looping on all public properties
Checks to see if volume type matches existing volume, not 100% sure yet but I believe we may need to create a completely new model for this unless the Volume model class type can be changed from craft\\awss3\\Volume to craft\\volumes\\Local?
Why
Volumes cannot be updated via the cli
Concerns
I am concerned about adding continue here as I am not sure if there is anything necessary further down in the method that this could skip.
Previously, without this continue, the method could reach the bottom, and in turn running both update and save methods for a processor. This would result in console errors because of the 2nd save running, even though the update was successful along the lines of:
home already exists
In addition, not sure sure how to best prep your $errors variable, it seems different in a couple of places. Tried to setup the following:
if (get_class($volume) !== $item['type']) {
// @TODO Deal with scenario where volume type changes, new class required.
$errors = [
'type' => [
Architect::t('Does not support updated volume types yet')
]
];
return [null, $errors];
}
What changes made
craft\\awss3\\Volume
tocraft\\volumes\\Local
?Why
Volumes cannot be updated via the cli
Concerns
I am concerned about adding
continue
here as I am not sure if there is anything necessary further down in the method that this could skip. Previously, without thiscontinue
, the method could reach the bottom, and in turn running bothupdate
andsave
methods for a processor. This would result in console errors because of the 2ndsave
running, even though the update was successful along the lines of:In addition, not sure sure how to best prep your $errors variable, it seems different in a couple of places. Tried to setup the following:
Though with this I get the following response:
Can you suggest how this could be better?
Testing
/var/www/site/update.json
:Run with:
./var/www/site/craft/craft architect/import/update /var/www/site/update.json