Skip to content

Commit

Permalink
🔥 Drop support for ftp filesystems
Browse files Browse the repository at this point in the history
  • Loading branch information
neoground committed Mar 3, 2024
1 parent dfeef5b commit 9a2a880
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- `UserModel` class which is the new base model for the app's `User` model.

### Removed
- Dropped support for FTP filesystems (SFTP is preferred if needed at all).

---

## [3.2]
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Charm Framework",
"homepage": "https://neoground.com/projects/charm",
"license": "MIT",
"version": "v3.2.1",
"version": "v3.2.2",
"authors": [
{
"name": "Sven Reifschneider",
Expand All @@ -25,7 +25,6 @@
"dragonmantank/cron-expression": "^3.3",
"phpmailer/phpmailer": "^6.9",
"league/flysystem": "^3.24",
"league/flysystem-ftp": "^3.24",
"league/flysystem-sftp-v3": "^3.23",
"filp/whoops": "^2.15",
"maximebf/debugbar": "^1.21",
Expand Down
24 changes: 0 additions & 24 deletions src/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use Charm\Vivid\Kernel\Interfaces\ModuleInterface;
use League\Flysystem\Filesystem;
use League\Flysystem\FilesystemAdapter;
use League\Flysystem\Ftp\FtpAdapter;
use League\Flysystem\Ftp\FtpConnectionOptions;
use League\Flysystem\Local\LocalFilesystemAdapter;
use League\Flysystem\PhpseclibV3\SftpAdapter;
use League\Flysystem\PhpseclibV3\SftpConnectionProvider;
Expand Down Expand Up @@ -60,13 +58,6 @@ public function postInit()
$this->addLocalFilesystem($name, $data['path']);
}
break;
case 'ftp':
// All values provided by $data. Only strip type (only used by us)
$config = $data;
unset($config['type']);

$this->addFtpFilesystem($name, $config);
break;
case 'sftp':
// All values provided by $data. Only strip type (only used by us)
$config = $data;
Expand Down Expand Up @@ -103,21 +94,6 @@ public function addLocalFilesystem(string $name, string $path): Filesystem
return $this->addFilesystemByAdapter($name, new LocalFilesystemAdapter($path));
}

/**
* Add a FTP filesystem
*
* @param string $name name of filesystem
* @param array $config config values (see FtpConnectionOptions)
*
* @return Filesystem
*/
public function addFtpFilesystem(string $name, array $config): Filesystem
{
return $this->addFilesystemByAdapter($name, new FtpAdapter(
FtpConnectionOptions::fromArray($config)
));
}

/**
* Add a SFTP filesystem
*
Expand Down

0 comments on commit 9a2a880

Please sign in to comment.