PHPackages                             nnmer/qiniu-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. [HTTP &amp; Networking](/categories/http)
4. /
5. nnmer/qiniu-bundle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nnmer/qiniu-bundle
==================

Symfony2(3) bundle integration with 七牛 (Qiniu) CDN service

368PHP

Since Sep 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/nnmer/qiniu-bundle)[ Packagist](https://packagist.org/packages/nnmer/qiniu-bundle)[ RSS](/packages/nnmer-qiniu-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

This bundle aim is to help to work with [七牛](https://www.qiniu.com/) CDN service.

The work on bundle is in process, the documentation will be updated respectively.

### Installation &amp; Configuration

[](#installation--configuration)

*Note: this bundle doesn't provide any 七牛 frontend related code.*

1. Install: `composer require nnmer/qiniu-bundle`
2. Add bundle AppKernel.php :

```
 ...
 new Nnmer\QiniuBundle(),
 ...
```

3. Add bundle configuration at config.yml

```
nnmer_qiniu:
    accessKey: xxxxxxx
    secretKey: yyyyyyy
    defaultBucket: a1
    initiateAdapters:
        - gaufrette
    buckets: # is an array of the buckets, later each of them will be available as a service. Should be at least 1 provided
        - a1
        - b2
```

4. Add to you routing

```
qiniu_processing_results:
    resource: "@NnmerQiniuBundle/Controller/QiniuCallbackController.php"
    type:     annotation
    prefix:   /
```

5. if you are behind symfony's firewall, then add to your security.yml access\_control section:

```
- { path: ^/qiniu-callback-url, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/qiniu-persistence-notify-url, role: IS_AUTHENTICATED_ANONYMOUSLY }
```

6. Done. From this point once you will receive a callback from Qiniu the 2 events can be raised, depends on the callback:

- `QiniuEvents::FILE_UPLOADED`
- `QiniuEvents::PERSISTENCE_RESULTS_RECEIVED`

the content of the event is the payload of the callback, so you can process you logic by listening to this events and manage the payload data

### Overwriting controller

[](#overwriting-controller)

If you want to have custom controller logic then do either:

- extend `QiniuCallbackController` class (this will give you existing 2 callbacks defined)
- implement `QiniuCallbackControllerInterface` interface (you will need to define the content for the controller's 2 callbacks methods)

In this case remember to repoint routing definition to your content, or remove it if you manage routing definitions yourself

### Available services

[](#available-services)

NOTE: bucket's name in services being renamed from original name: all `-` arereplaces by `_`

After container is built available next services:

`nnmer_qiniu.*_service` , where `*` is each of the `buckets`

and `nnmer_qiniu.service` which is alias to the service with `defaultBucket`

if KnpGaufretteBundle is installed and `nnmer_qiniu.initiateAdapters` has `gaufrette` as array element then additional next services will be generate:

`nnmer_qiniu.gaufrette_*_adapter` where `*` is each of the `buckets`

### Twig helpers

[](#twig-helpers)

`downloadUrl(url, service)` - to build a download link, signed and with time expiration. `service` is the id of the needed service. (in a controller the alias is $this-&gt;container-&gt;get('service id here')-&gt;getAuth()-&gt;privateDownloadUrl($url))

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1620737?v=4)[Anton Romanov](/maintainers/nnmer)[@nnmer](https://github.com/nnmer)

---

Top Contributors

[![nnmer](https://avatars.githubusercontent.com/u/1620737?v=4)](https://github.com/nnmer "nnmer (19 commits)")

### Embed Badge

![Health badge](/badges/nnmer-qiniu-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nnmer-qiniu-bundle/health.svg)](https://phpackages.com/packages/nnmer-qiniu-bundle)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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