PHPackages                             proglab/sftp-client-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. proglab/sftp-client-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

proglab/sftp-client-bundle
==========================

Sftp Client Bundle

v1.0.4(4y ago)061MITPHPPHP &gt;=7.4

Since Jun 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Proglab/SftpClientBundle)[ Packagist](https://packagist.org/packages/proglab/sftp-client-bundle)[ RSS](/packages/proglab-sftp-client-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

SftpClientBundle
================

[](#sftpclientbundle)

A SFTP client

Installation
------------

[](#installation)

Open a command console, enter your project directory and execute:

```
composer require proglab/sftp-client-bundle
```

If you're not using symfony/flex, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Proglab\SftpClientBundle\SftpClientBundle::class => ['all' => true],
];
```

Usage
-----

[](#usage)

### Generals

[](#generals)

#### Getting a SftpClient

[](#getting-a-sftpclient)

You have two choices:

1. Create the client manually, and pass it a logger:

```
use Proglab\SftpClientBundle\Service\SftpClient;
use Psr\Log\NullLogger;

$logger = new NullLogger();
$client = new SftpClient($logger);
```

2. Get the client from Dependency Injection:

```
use Proglab\SftpClientBundle\Service\SftpClient;

class Service
{
    public function __construct(private SftpClient $client)
    {
    }
}
```

#### Connection

[](#connection)

You must connect to a SFTP server.

You need the username, password, host and port (22 by default).

```
$client->connect('username', 'password', 'host', 22);
```

#### Deconnection

[](#deconnection)

```
$client->deco();
```

### List files

[](#list-files)

#### From remote directoty

[](#from-remote-directoty)

List files in remote directory. The remote directory path must be absolute.

```
$files = $client->getRemoteListFiles('/var/www/');
```

#### From local directory

[](#from-local-directory)

List files in local directory. The local directory path must be absolute.

```
$files = $client->getLocalListFiles('/var/www/');
```

### Operations

[](#operations)

#### Upload

[](#upload)

Upload a file from local to remote dir:

```
$files = $client->upload($fileLocalPath, $fileRemotePath, $delete = true);
```

#### Download

[](#download)

Download a file from remote to local dir:

```
$files = $client->download($fileRemotePath, $fileLocalPath, $delete = true);
```

#### Sync local dir to remote

[](#sync-local-dir-to-remote)

Synchronize local files to remote directory:

```
$files = $client->syncLocalDirToRemote($localDir, $remoteDir, $delete = true);
```

#### Sync remote dir to local

[](#sync-remote-dir-to-local)

Synchronize remote files to local directory:

```
$files = $client->syncRemoteDirToLocal($remoteDir, $localDir, $delete = true);
```

Thanks
------

[](#thanks)

Many thanks to [jmsche](https://github.com/jmsche) for his help

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

1803d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/441b0b3cc2ce121c0d99034dd3b87d1cb73a9d8613d9518968b295c10aae31cf?d=identicon)[Proglab](/maintainers/Proglab)

---

Top Contributors

[![Proglab](https://avatars.githubusercontent.com/u/4598760?v=4)](https://github.com/Proglab "Proglab (15 commits)")[![jmsche](https://avatars.githubusercontent.com/u/3929498?v=4)](https://github.com/jmsche "jmsche (6 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/proglab-sftp-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/proglab-sftp-client-bundle/health.svg)](https://phpackages.com/packages/proglab-sftp-client-bundle)
```

###  Alternatives

[vich/uploader-bundle

Ease file uploads attached to entities

1.9k25.9M114](/packages/vich-uploader-bundle)[sonata-project/media-bundle

Symfony SonataMediaBundle

4625.5M71](/packages/sonata-project-media-bundle)[helios-ag/fm-elfinder-bundle

ElFinder bundle, adds ElFinder file manager to your Symfony project

2814.8M27](/packages/helios-ag-fm-elfinder-bundle)[artgris/filemanager-bundle

FileManager is a simple Multilingual File Manager Bundle for Symfony

182420.8k9](/packages/artgris-filemanager-bundle)[symfony/ux-dropzone

File input dropzones for Symfony Forms

541.5M4](/packages/symfony-ux-dropzone)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
