This issue has novice tasks. If you are an experienced core developer and have multiple commit mentions, please review novices' work on these tasks rather than doing them yourself. Feedback from experienced contributors is valued.
Problem/Motivation
+++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php
@@ -0,0 +1,323 @@
+ $filetransfer->connect();
This can never work! the connect method is an abstract protected method! Looking at the implementations maybe they are somehow making it public... who knows? http://3v4l.org/08n7b interesting :) Opening a new issue to fix this.
Proposed resolution
Change \Drupal\Core\FileTransfer\FileTransfer::connect() to be abstract public.
Fix implementations (SSH and Local) to properly declare connect() as a public function.
Remaining tasks
- Write patch (novice)
- Review patch to check it fixes the issue, the change is properly documented and for coding standards. Provide test evidence (novice)
- Keep issue summary up to date (novice)
User interface changes
None
API changes
The abstract method becomes public - but the implementations already are :)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | filetransfer-connect-public-2242405-5.patch | 2.35 KB | mikebarkas |
Comments
Comment #1
sunPerhaps even better: Add an actual
FileTransferInterface+ remove/replace the abstract methods?Comment #2
tim.plunkettSee #2121863: There is no FileTransferInterface and #2038271: Convert hook_filetransfer_info() to plugin system
Comment #3
jlbellidoFirst patch for this issue:
- I've updated method FileTransfer::connect() as public.
- I've changed implementations of ::conect method in all clases that implements the abstract class FileTransfer to make it public.
Comment #4
mikebarkas commentedI am working on this at DrupalCon Austin.
Comment #5
mikebarkas commentedDirectory structure changed:
PSR-0
/core/modules/system/lib/Drupal/system/Tests/FileTransfer/TestFileTransfer.php
PSR-4
/core/modules/system/src/Tests/FileTransfer/TestFileTransfer.php
Comment #6
dawehnerFor now this seems to be the way forward
Comment #7
alexpottCommitted 558ad0c and pushed to 8.x. Thanks!