PHPackages                             webalternatif/flysystem-openstack-swift - 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. webalternatif/flysystem-openstack-swift

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

webalternatif/flysystem-openstack-swift
=======================================

Flysystem v3 adapter for OpenStack Swift

v0.6.0(4mo ago)33.6k↓82.8%13MITPHPPHP 8.2.\* || 8.3.\* || 8.4.\* || 8.5.\*CI passing

Since Aug 29Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/webalternatif/flysystem-openstack-swift)[ Packagist](https://packagist.org/packages/webalternatif/flysystem-openstack-swift)[ RSS](/packages/webalternatif-flysystem-openstack-swift/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (9)Dependencies (7)Versions (11)Used By (3)

Flysystem v3 OpenStack Swift adapter
====================================

[](#flysystem-v3-openstack-swift-adapter)

[![Source code](https://camo.githubusercontent.com/9b8ddc7e56da16a99ff97b3a2bf8574dbb0d4ead97f47acc88d308eb47ef5730/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d4769744875622d626c7565)](https://github.com/webalternatif/flysystem-openstack-swift)[![Software license](https://camo.githubusercontent.com/ebfae4c695cf151e54848dfc1b830d4b77a4c6ba4c00456d509fce09ccae436e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f776562616c7465726e617469662f666c7973797374656d2d6f70656e737461636b2d7377696674)](https://github.com/webalternatif/flysystem-openstack-swift/blob/main/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/ac381726a09562f6e36f6724f3f286674b563cbb0c4ee0af1348f665f19ae495/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f776562616c7465726e617469662f666c7973797374656d2d6f70656e737461636b2d7377696674)](https://github.com/webalternatif/flysystem-openstack-swift/issues)[![Test status](https://camo.githubusercontent.com/c4319a013f045de56b99ac5f5d325a08bfaf709306ccdbb25108824780fca5bd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f776562616c7465726e617469662f666c7973797374656d2d6f70656e737461636b2d73776966742f746573742e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473)](https://github.com/webalternatif/flysystem-openstack-swift/actions/workflows/test.yml)[![Psalm coverage](https://camo.githubusercontent.com/0f29d7dc711f25f6f960c8def9521fdd6c0af50b7a2f39b8dca43b8be1293608/68747470733a2f2f73686570686572642e6465762f6769746875622f776562616c7465726e617469662f666c7973797374656d2d6f70656e737461636b2d73776966742f636f7665726167652e737667)](https://psalm.dev)[![Psalm level](https://camo.githubusercontent.com/26e5e1d5559ec39efb3356ef1cba3db6b1162ff78e119e5cec016bb86a287b46/68747470733a2f2f73686570686572642e6465762f6769746875622f776562616c7465726e617469662f666c7973797374656d2d6f70656e737461636b2d73776966742f6c6576656c2e737667)](https://psalm.dev)

A [Flysystem](https://flysystem.thephpleague.com) v3 adapter for OpenStack Swift, using [`php-opencloud/openstack`](https://github.com/php-opencloud/openstack).

If you're looking for a Flysystem v1 adapter, see [`chrisnharvey/flysystem-openstack-swift`](https://github.com/chrisnharvey/flysystem-openstack-swift).

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

[](#installation)

```
$ composer require webalternatif/flysystem-openstack-swift
```

Usage
-----

[](#usage)

```
use League\Flysystem\Filesystem;
use OpenStack\OpenStack;
use Webf\Flysystem\OpenStackSwift\OpenStackSwiftAdapter;

$openstack = new OpenStack([
    'authUrl' => '{authUrl}',
    'region' => '{region}',
    'user' => [
        'id' => '{userId}',
        'password' => '{password}',
    ],
    'scope' => ['project' => ['id' => '{projectId}']],
]);

$adapter = new OpenStackSwiftAdapter($openstack, '{containerName}');

$flysystem = new Filesystem($adapter);
```

### Uploading large objects

[](#uploading-large-objects)

To use the `createLargeObject` method of the underlying OpenStack library to upload [large objects](https://php-openstack-sdk.readthedocs.io/en/latest/services/object-store/v1/objects.html#create-a-large-object-over-5gb) (which is mandatory for files over 5 GB), you must use the `writeStream` method and define the `segment_size` config option.

The `segment_container` option is also available if you want to upload segments in another container.

#### Example

[](#example)

```
use Webf\Flysystem\OpenStackSwift\Config;

$flysystem->writeStream($path, $content, ([
    Config::OPTION_SEGMENT_SIZE => 52428800, // 50 MiB
    Config::OPTION_SEGMENT_CONTAINER => 'test_segments',
]);
```

### Generating temporary URLs

[](#generating-temporary-urls)

This adapter supports generating temporary URLs as described in [Flysystem's documentation](https://flysystem.thephpleague.com/docs/usage/temporary-urls).

To do so, you must :

- set a secret key at the *account* or *container* level of your OpenStack Swift instance (see details in the [OpenStack documentation](https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html#secret-keys)),
- provide this secret key as third argument (`$tempUrlKey`) when creating the adapter.

#### Available options

[](#available-options)

When calling `Filesystem::temporaryUrl()`, you can pass the following options as third argument (`$config`):

Option keyDescriptionTypeDefault value`digest`The digest algorithm to use for the HMAC cryptographic signature (given as first parameter of [hash\_hmac](https://www.php.net/manual/en/function.hash-hmac.php)).`string``'sha256'``file_name`A string to override the default file name (which is based on the object name) when the file is downloaded.`string``null``prefix`If `true`, a prefix-based temporary URL will be generated.`bool``false`Those option keys are available as public constants in the `Webf\Flysystem\OpenStackSwift\Config` class.

More information about those options can be found in the [OpenStack documentation](https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html).

#### Example

[](#example-1)

```
use League\Flysystem\Filesystem;
use Webf\Flysystem\OpenStackSwift\OpenStackSwiftAdapter;

// ... (see above)

$adapter = new OpenStackSwiftAdapter($openstack, '{containerName}', '{tempUrlKey}');
$flysystem = new Filesystem($adapter);

$flysystem->temporaryUrl($path, new DateTime('+1 hour'), [
    // options...
]);
```

Tests
-----

[](#tests)

This library uses the `FilesystemAdapterTestCase` provided by [`league/flysystem-adapter-test-utilities`](https://github.com/thephpleague/flysystem-adapter-test-utilities), so it performs integration tests that need a real OpenStack Swift container.

To run tests, duplicate the `phpunit.xml.dist` file into `phpunit.xml` and fill all the environment variables, then run:

```
$ composer test
```

This will run [Psalm](https://psalm.dev) and [PHPUnit](https://phpunit.de), but you can run them individually like this:

```
$ composer psalm
$ composer phpunit
```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance76

Regular maintenance activity

Popularity27

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 97.7% 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 ~204 days

Recently: every ~291 days

Total

9

Last Release

132d ago

PHP version history (6 changes)v0.1.0PHP 8.0.\*

v0.2.1PHP 8.0.\* || 8.1.\*

v0.3.1PHP 8.0.\* || 8.1.\* || 8.2.\*

v0.3.2PHP 8.0.\* || 8.1.\* || 8.2.\* || 8.3.\*

v0.4.0PHP 8.1.\* || 8.2.\* || 8.3.\* || 8.4.\*

v0.6.0PHP 8.2.\* || 8.3.\* || 8.4.\* || 8.5.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9e1dc82cddb91ebc3b452a6ddc2d92ee750f38dfb4b92427fbfe4f653509b76?d=identicon)[chapa](/maintainers/chapa)

---

Top Contributors

[![chapa](https://avatars.githubusercontent.com/u/457659?v=4)](https://github.com/chapa "chapa (43 commits)")[![treehousedevelopers](https://avatars.githubusercontent.com/u/92868150?v=4)](https://github.com/treehousedevelopers "treehousedevelopers (1 commits)")

---

Tags

filesystemFlysystemadapterstorageOpenstackswift

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webalternatif-flysystem-openstack-swift/health.svg)

```
[![Health](https://phpackages.com/badges/webalternatif-flysystem-openstack-swift/health.svg)](https://phpackages.com/packages/webalternatif-flysystem-openstack-swift)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k285.7M1.0k](/packages/league-flysystem-aws-s3-v3)[nimbusoft/flysystem-openstack-swift

Flysystem adapter for OpenStack Swift

44818.0k7](/packages/nimbusoft-flysystem-openstack-swift)[sausin/laravel-ovh

OVH Object Storage driver for laravel

42161.8k](/packages/sausin-laravel-ovh)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2812.1M44](/packages/league-flysystem-async-aws-s3)

PHPackages © 2026

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