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

User interface changes

None

API changes

The abstract method becomes public - but the implementations already are :)

Comments

sun’s picture

Perhaps even better: Add an actual FileTransferInterface + remove/replace the abstract methods?

tim.plunkett’s picture

jlbellido’s picture

Status: Active » Needs review
StatusFileSize
new2.41 KB

First 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.

mikebarkas’s picture

Assigned: Unassigned » mikebarkas

I am working on this at DrupalCon Austin.

mikebarkas’s picture

Assigned: mikebarkas » Unassigned
StatusFileSize
new2.35 KB

Directory structure changed:

PSR-0
/core/modules/system/lib/Drupal/system/Tests/FileTransfer/TestFileTransfer.php

PSR-4
/core/modules/system/src/Tests/FileTransfer/TestFileTransfer.php

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

For now this seems to be the way forward

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 558ad0c and pushed to 8.x. Thanks!

  • alexpott committed 558ad0c on 8.x
    Issue #2242405 by mikebarkas, jlbellido | alexpott: Fixed FileTransfer::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.