Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Oct 2013 at 00:07 UTC
Updated:
8 May 2015 at 01:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonin core/modules/update/update.authorize.inc:
So it appears that the I think only user of this class is declaring it needs a FileTransfer object as input when it calls update() or install().
For now, I think the thing to do on Updater is to just use the FileTransfer class instead of the nonexistent interface. And perhaps file a separate issue that there should be an interface? FileTransfer is currently an abstract class that does not extend any interfaces, and that is where the methods that the Updater class is actually using are defined. ChmodInterface does not have all of these methods, so using it in this case would be incorrect.
Or, we could change this issue to non-documentation and make the issue be that there *should* be a FileTransfer interface (it seems like there should be an interface and not just an abstract class for this?).
Comment #2
jhodgdonThis issue is still valid. However, FileTransferInterface is used in the code and not just docs, so moving to the Base System component.
Should be a good Novice issue: change all mentions of FileTransferInterface in Core to say FileTransfer instead.
Comment #3
drubbHere 's a first patch just changing all references from FileTransferInterface (old) to FileTransfer (new).
Comment #4
jhodgdonChange looks right to me. There are other problems in the docs and some @todos in this code, but they are out of scope for this issue. That code just is kind of a mess...
Thanks!
Not sure why the test bot is not firing on this one... I would not suggest committing it until it has turned green...
Oh, the file was set to Hidden. I'll unhide it and hopefully the test bot will agree that it's a good patch.
Comment #7
googletorp commentedThe patch should pass, if pass RTCB.
Comment #8
xjmThanks @jhodgdon and @drubb.
So the fact that we have this
usestatement referring to an interface that doesn't exist could mean either that the use statement was unused, or that code using it was untested.I looked through
Updater.phpand the only non-documentation use is inmakeBackup()... which has a@todothat it is not implemented, without a reference to an existing issue, and yet the method is called inUpdater::update():So that is clearly an untested code path. I agree with @jhodgdon that fixing that is not in scope here, but before we commit this patch, can we get a followup issue to fix the broken code path? Edit: First we should check for an existing issue. In either case we should reference it here.
Thanks!
Comment #9
googletorp commentedI've taken patch from #3 and added the reference to the newly created issue, regarding the implementation of makeBackup #2474355: \Drupal\Core\Updater\Updater::makeBackup should probably be removed, and the code path that calls it is broken.
@xjm This makes this RTBC right?
Comment #10
googletorp commentedComment #11
jhodgdonAn interdiff file would have been helpful here -- next time! :)
Anyway, yes thanks for filing #2474355: \Drupal\Core\Updater\Updater::makeBackup should probably be removed, and the code path that calls it is broken (adding as related) and the new patch is RTBC again.
Comment #12
xjmThanks @googletorp, that works!
I noticed also that the inline mentions of the class name were missing the leading slash (also a problem in HEAD), and that the one-line summary for
UpdaterFileTransferExceptionis two lines instead. Out of scope here, but we could add another followup issue for that as well.This issue only changes documentation, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase. Committed and pushed to 8.0.x