PHPackages                             elvandar/ec-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. elvandar/ec-bundle

ActiveSymfony-bundle[HTTP &amp; Networking](/categories/http)

elvandar/ec-bundle
==================

A simple bundle to make communication with external websites easier

1.0(7y ago)07MITPHPPHP ^7.0

Since Nov 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Elvandarysalys/EcBundle)[ Packagist](https://packagist.org/packages/elvandar/ec-bundle)[ Docs](https://github.com/Elvandarysalys/EcBundle)[ RSS](/packages/elvandar-ec-bundle/feed)WikiDiscussions developp Synced yesterday

READMEChangelog (1)DependenciesVersions (4)Used By (0)

EcBundle
========

[](#ecbundle)

Small Bundle to help use externals urls inside a symfony project.

The goal is to help the communication by centralizing all the routes inside a single configuration fila and providing methods to use thems.

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

[](#installation)

Open a command console, enter your project directory and execute:

```
$ composer require
```

Hom to use the bundle
=====================

[](#hom-to-use-the-bundle)

Inside `elvandar_ec.yml`, you can configure your sites and routes:

```
    site:
        routes:
            name: 'http://path/to/your/site'
```

The file is organised betwin `sites`. Each `site` represents a grouping of urls under the `routes` list.

Configuration example
---------------------

[](#configuration-example)

```
    your_first_site:
        routes:
            home: 'http://first-site/'
            description: 'http://first-site/description'
            contact: 'http://first-site/contact'
    your_second_site:
        routes:
            home: 'http://second-site/'
            contact: 'http://second-site/contact'
            blog: 'http://second-site/blog'

    The name of your site: # the name you want to give to your site
        routes:            # a list of the site routes
            Name: 'URL'    # name of the route : url of the route
```

Use the service
---------------

[](#use-the-service)

You can now use the `Externals` service to retrieve :

```
    $externals = $this->container->get('ec');

    $externals->getRoute('contact', 'your_second_site');
```

or redirect to the desired route :

```
    $externals = $this->container->get('ec');

    $externals->redirectToExternal('description', 'your_first_site');
```

Bboth the `redirectToEcternal` and `getRoute` methods follow the same parameters rules:

1 - First parameter
===================

[](#1---first-parameter)

The first parameter is the name of your route.

For example inside the example configuration, the name for `http://second-site/blog` is `blog`.

This parameter is required.

2 - Second parameter
====================

[](#2---second-parameter)

The second parameter is the name of the site. It is not required but will be needed if multiple roads have the same name.

For example, the second parameter is not needed for the `blog` route but will be needed for the `home` or the `contact` routes.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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 ~0 days

Total

2

Last Release

2736d ago

Major Versions

0.1 → 1.02018-11-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/7222a363a323c578bce351640a7062fba7c69d56d62bdbc93bc1f849671eb76c?d=identicon)[Elvandar](/maintainers/Elvandar)

---

Top Contributors

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

---

Tags

symfonycms

### Embed Badge

![Health badge](/badges/elvandar-ec-bundle/health.svg)

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

###  Alternatives

[fruitcake/php-cors

Cross-origin resource sharing library for the Symfony HttpFoundation

311242.1M35](/packages/fruitcake-php-cors)[mediamonks/rest-api-bundle

MediaMonks Rest API Symfony Bundle

1656.2k1](/packages/mediamonks-rest-api-bundle)

PHPackages © 2026

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