knplabs/gaufrette
Composer 安装命令:
composer require knplabs/gaufrette
包简介
PHP library that provides a filesystem abstraction layer
README 文档
README
Gaufrette provides a filesystem abstraction layer.
Why use Gaufrette?
Imagine you have to manage a lot of media in a PHP project. Let's see how to take this situation to your advantage using Gaufrette.
The filesystem abstraction layer permits you to develop your application without the need to know where all those media will be stored and how.
Another advantage of this is the possibility to update the location of the files without any impact on the code apart from the definition of your filesystem. In example, if your project grows up very fast and if your server reaches its limits, you can easily move your medias in an Amazon S3 server or any other solution.
Documentation
Read the official Gaufrette documentation.
Metapackages for adapters
Every maintained adapter now has a dedicated metapackage. You can find the list on packagist. We highly recommend you to use them as they contain their own requirements: you don't need to worry about third-party dependencies to install before using Gaufrette anymore.
Symfony integration
Symfony integration is available through KnpLabs/KnpGaufretteBundle.
Maintainers
Here is the list of the dedicated maintainer(s) for every adapter not deprecated. If you don't receive any response to your issue or pull request in a timely manner, ping us:
| Adapter | Referent |
|---|---|
| AsyncAws S3 | @Nyholm |
| AwsS3 | @NiR- |
| AzureBlobStorage | @NiR- |
| DoctrineDbal | @pedrotroller, @NicolasNSSM |
| Flysystem | @nicolasmure |
| Ftp | @fabschurt |
| GoogleCloudStorage | @AntoineLelaisant |
| GridFS | @NiR- |
| InMemory | |
| Local | |
| OpenCloud | @NiR- |
| PhpseclibSftp | @fabschurt |
| Zip |
For InMemory, Local, and Zip adapters everyone in this list is considered as a maintainer.
Development
Requires :
- docker-ce
- docker-compose
- Create
.envfile :
$ make docker.dev
and configure it as you want.
- Build the PHP docker image :
$ make docker.build
- Install dependencies :
$ make docker.all-deps
- Run tests :
$ make docker.tests
You can also use a different php version, simply set the PHP_VERSION env var
to any of these values when calling a make target :
7.17.2(default)7.3(The docker setup for PHP 7.3 is available. However, the ssh2 extension is not installed as it is not available for PHP 7.3 yet)
See the docker-compose.yml file for more details.
You'll need to clear the previously installed dependencies when switching from one version to an other. To do so, run :
$ make clear-deps $ PHP_VERSION=<the_version_you_want_to_use> make build install-deps
- Apply Coding Standards
You should check for CS violations by using
$ make php-cs-compare
and fix them with
$ make php-cs-fix
Note
This project does not have any stable release yet but we do not want to break BC now.
knplabs/gaufrette 适用场景与选型建议
knplabs/gaufrette 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 41.35M 次下载、GitHub Stars 达 2.47k, 最近一次更新时间为 2011 年 11 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「media」 「file」 「filesystem」 「abstraction」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 knplabs/gaufrette 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 knplabs/gaufrette 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 knplabs/gaufrette 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A SDK for working with B2 cloud storage.
A PHP class providing static methods for reading, writing, copying, moving, and deleting files and directories, MIME type detection, image size detection, and file permission management
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Simple Sharing generates social media share links within CP entry pages, allowing you to quickly & easily share entries.
The flysystem adapter for yandex disk rest api.
A sleek PHP wrapper around rclone with Laravel-style fluent API syntax
统计信息
- 总下载量: 41.35M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2485
- 点击次数: 21
- 依赖项目数: 139
- 推荐数: 17
其他信息
- 授权协议: MIT
- 更新时间: 2011-11-08