定制 marktaborosi/flysystem-nextcloud 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marktaborosi/flysystem-nextcloud

最新稳定版本:1.0.0

Composer 安装命令:

composer require marktaborosi/flysystem-nextcloud

包简介

A Flysystem v3 adapter for Nextcloud WebDav integration

README 文档

README

Author Latest Version Software License Downloads PHP 8.2+ CI

Flysystem adapter for Nextcloud WebDAV integration.

Compatible with PHP 8.2+ and Flysystem v3.29+.

Features

  • 📂 Nextcloud storage adapter for League\Flysystem
  • 🏗️ Fully tested with Flysystem adapter utilities + additional tests

Requirements

  • PHP 8.2 or higher
  • Flysystem v3.29+
  • Nextcloud instance (with WebDAV access)
  • Docker (for local testing)

Installation

composer require marktaborosi/flysystem-nextcloud

Usage

use League\Flysystem\Filesystem;
use Marktaborosi\FlysystemNextcloud\NextCloudAdapter;

$adapter = new NextCloudAdapter([
    'baseUri' => 'http://localhost:8080/remote.php/dav/files/admin/',
    'userName' => 'admin',
    'password' => 'admin',
]);

$filesystem = new Filesystem($adapter);

$filesystem->write('example.txt', 'Hello Nextcloud!');

Testing

This adapter includes a full test suite using league/flysystem-adapter-test-utilities.

Running tests locally

  1. Start the Docker containers:
docker-compose up -d
  1. Run PHPUnit:
vendor/bin/phpunit

Important: Ensure the Nextcloud container is running and fully initialized before executing the tests.

Docker Setup

Provided docker-compose.yml includes:

  • MariaDB database
  • Nextcloud app

Configuration expects:

  • Admin user: admin
  • Admin password: admin
  • DB credentials: see docker-compose.yml or .env.

Note: You can override port mappings easily via the .env file.
Example .env variables:

NEXTCLOUD_HTTP_PORT=8080
NEXTCLOUD_DB_PORT=3306

MYSQL_ROOT_PASSWORD=root_password
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=nextcloud_password

NEXTCLOUD_ADMIN_USER=admin
NEXTCLOUD_ADMIN_PASSWORD=admin

Accessing the Nextcloud Web Interface

Once the Docker containers are up, you can access the Nextcloud web interface locally:

http://localhost:[NEXTCLOUD_HTTP_PORT]

Default credentials:

  • Username: ${NEXTCLOUD_ADMIN_USER} (default: admin)
  • Password: ${NEXTCLOUD_ADMIN_PASSWORD} (default: admin)

You can login and interact directly with your running Nextcloud instance.

Suggested Packages

  • sabre/dav: Required for WebDAV communication
  • larapack/dd: Optional, for debugging purposes

License

The MIT License (MIT). Please see License File for more information.

Acknowledgements

Big thanks to:

This adapter would not be possible without these open-source projects. 🙏

Made with ❤️ by Mark Taborosi

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固