PHPackages                             babeuloula/cdn-php-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. babeuloula/cdn-php-bundle

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

babeuloula/cdn-php-bundle
=========================

A proxy between your application and CDN PHP

0.3.3(1mo ago)191MITPHPPHP &gt;=8.1CI passing

Since Feb 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/babeuloula/cdn-php-bundle)[ Packagist](https://packagist.org/packages/babeuloula/cdn-php-bundle)[ RSS](/packages/babeuloula-cdn-php-bundle/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (33)Versions (15)Used By (0)

CDN PHP Symfony Bundle
======================

[](#cdn-php-symfony-bundle)

A Symfony Bundle for [CDN PHP](https://github.com/babeuloula/cdn-php).

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require babeuloula/cdn-php-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    BaBeuloula\CdnPhpBundle\CdnPhpBundle::class => ['all' => true],
];
```

### Step 3: Configure the Bundle

[](#step-3-configure-the-bundle)

```
# config/packages/cdn_php.yaml

cdn_php:
    proxy:
        assets_path: 'mandatory'
        url: 'mandatory'
        check_assets: true # if the bundle needs to check if you have the file on the server before fetch from CDN PHP
        encrypted_parameters: false # if you need to hide the query parameters on your application
    encrypter:
        secret_key: null # Signs URLs generated by cdn_php() / cdn() Twig functions (app → browser).
                         # Used to prevent tampering with query parameters on the public-facing proxy route.
                         # Algorithm: SHA1(query_string + secret_key). Validated by Signer::isValid().
                         # Required when proxy.encrypted_parameters is true.
        cdn_secret_key: null # Signs requests sent by Proxy to the CDN PHP service (app → CDN).
                             # Must match the SIGNATURE_SECRET environment variable set on the CDN PHP instance.
                             # Algorithm: HMAC-SHA256(imageUrl:expires, cdn_secret_key).
                             # Leave null if CDN PHP runs without SIGNATURE_SECRET.
        cdn_expires_ttl: 3600 # Validity duration (in seconds) of CDN request signatures.
                              # Only used when cdn_secret_key is set. Default: 3600 (1 hour).
    twig:
        route_name: 'mandatory' # the route to the controller that displays the assets
        route_parameter: 'mandatory' # the route parameter name
```

Using a fallback handler
========================

[](#using-a-fallback-handler)

If you don't have access to CDN PHP or if you want to use it on local development, you can set up a fallback handler.

Actually, I only support [Intervention Image v3](https://image.intervention.io/v3).

```
Intervention\Image\Drivers\Imagick\Driver: ~

BaBeuloula\CdnPhpBundle\FallbackHandler\InterventionImageFallbackHandler:
    arguments:
        $assetsPath: '_your_path_'
        $driver: '@Intervention\Image\Drivers\Imagick\Driver'
        $cache: '_your_cache_instance_'

BaBeuloula\CdnPhpBundle\FallbackHandler\FallbackHandlerInterface: '@BaBeuloula\CdnPhpBundle\FallbackHandler\InterventionImageFallbackHandler'
```

Contributing
============

[](#contributing)

### Build and install dependencies

[](#build-and-install-dependencies)

You can use the existing docker stack with the command `make install` to build the Dockerfile and install the composer dependencies.

If you want to execute some commands through Docker, just use `docker/exec your_command`.

### Run testing stack

[](#run-testing-stack)

```
# Run all tests
make check

# Execute PHPCS
make lint

# Execute PHPCS fixer
make fixer

# Execute PHPStan
make analyse
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance89

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~7 days

Total

10

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3761b383fa6ec2ff0c3afa00734e38f37f25562c6724224417f3d885e8cbae52?d=identicon)[BaBeuloula](/maintainers/BaBeuloula)

---

Top Contributors

[![babeuloula](https://avatars.githubusercontent.com/u/4849233?v=4)](https://github.com/babeuloula "babeuloula (13 commits)")

---

Tags

bundlecdnsymfonysymfony-bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/babeuloula-cdn-php-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/babeuloula-cdn-php-bundle/health.svg)](https://phpackages.com/packages/babeuloula-cdn-php-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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