承接 oihana/php-ftp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

oihana/php-ftp

Composer 安装命令:

composer require oihana/php-ftp

包简介

The Oihana PHP FTP library - a modern, strongly-typed FTP/FTPS client

README 文档

README

Oihana PHP FTP

A modern, strongly-typed FTP / FTPS client for PHP 8.4+, built in the spirit of the oihana/php-* libraries.

Latest Version
Total Downloads
License

🚀 Features

  • 🔌 FTP & FTPS (explicit TLS) over the native ext-ftp extension — zero runtime dependencies.
  • 🧩 Trait-composed client with a clean, mockable driver layer (FtpDriverInterface) — SFTP-ready by design.
  • 🔑 Authentication & security as first-class concerns: credentials are wiped from memory, secrets are never logged.
  • 📁 File & directory operations: upload, download, append, delete, rename, listing (MLSD/raw), chmod, recursive helpers.
  • 🧱 Constant enums everywhere — no magic strings for config keys, transfer modes or connection options.
  • 🪵 PSR-3 logging (optional) with retry + exponential backoff on transient failures.
  • 🔐 Seamless reuse of oihana/php-files path/MIME helpers and OpenSSL file encryption.
  • 🧪 Full unit-test coverage through the mockable driver — no live server required.

💡 Designed to be lightweight, testable, and compatible with any PHP 8.4+ project.

📦 Installation

Requires PHP 8.4+ with the ext-ftp extension.

Install via Composer:

composer require oihana/php-ftp

✅ Tests & coverage

Run the full unit-test suite (PHPUnit, strict mode):

composer test

Measure coverage (requires Xdebug or PCOV):

composer coverage        # text + Clover + HTML under build/coverage/
composer coverage:md     # readable Markdown summary (build/coverage/COVERAGE.md)

All transport calls go through FtpDriverInterface, so the suite reaches full coverage by mocking an in-memory driver — no real FTP server is needed. See CONTRIBUTING.md for the testing philosophy.

🧾 License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

👤 About the author

🛠️ Generate the Documentation

We use phpDocumentor to generate the API documentation into the ./docs folder.

composer doc

🔗 Related packages

  • oihana/php-files – file, path and OpenSSL helpers reused by this library: https://github.com/BcommeBois/oihana-php-files
  • oihana/php-core – core helpers and utilities: https://github.com/BcommeBois/oihana-php-core
  • oihana/php-reflect – reflection and hydration utilities: https://github.com/BcommeBois/oihana-php-reflect
  • oihana/php-enums – strongly-typed constant enumerations for PHP: https://github.com/BcommeBois/oihana-php-enums

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2026-06-30