PHPackages                             alexandret/evc-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. [API Development](/categories/api)
4. /
5. alexandret/evc-bundle

ActiveSymfony-bundle[API Development](/categories/api)

alexandret/evc-bundle
=====================

Integration of EVC API in Symfony applications

1.3.2(6y ago)1150MITPHPPHP ^7.2

Since Jan 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Alexandre-T/EvcBundle)[ Packagist](https://packagist.org/packages/alexandret/evc-bundle)[ Docs](https://github.com/Alexandre-T/EvcBundle)[ RSS](/packages/alexandret-evc-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (11)Versions (7)Used By (0)

EvcBundle
=========

[](#evcbundle)

This symfony bundle implements service to use the [evc.de](https://www.evc.de) API.

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.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, go to your symfony project directory and execute:

```
$ composer require alexandret/evc-bundle
```

Open env (or env.dist) file and search the new created lines to configure variable

```
###> alexandret/evc-bundle ###
EVC_API = ''
EVC_USERNAME = ''
EVC_PASSWORD = ''
###< alexandret/evc-bundle ###

```

Look at the configuration section for more explanation.

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### 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 alexandret/evc-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 [
    // ...
    Alexandre\EvcBundle\AlexandreEvcBundle::class => ['all' => true],
];
```

Open your `env` file and add the value of necessary configuration variables

### Step 3: Create a alexandre\_evc.yaml file

[](#step-3-create-a-alexandre_evcyaml-file)

Create a `alexandre_evc.yaml` file under the config/packages subdirectory. Then copy and paste these lines:

```
#config/packages/alexandre_evc.yaml
alexandre_evc:
  api_id: '%env(EVC_API)%'
  username: '%env(EVC_USERNAME)%'
  password: '%env(EVC_PASSWORD)%'
```

Do NOT replace env by your password. You have to configure your `.env` file as described in the below paragraph.

Configuration
-------------

[](#configuration)

EvcBundle needs data information. You shall complete them in your env file.

- EVC\_API: The api key provided by evc support
- EVC\_USERNAME: Your evc.de account number
- EVC\_PASSWORD: Your API password. This is **NOT** your evc.de account password. It's a separate password that you get from the EVC office.

Here is a sample:

```
###> alexandret/evc-bundle ###
EVC_API = sample_key
EVC_USERNAME = my_name
EVC_PASSWORD = my_password
###< alexandret/evc-bundle ###
```

How to mock your requests to the API?
-------------------------------------

[](#how-to-mock-your-requests-to-the-api)

You want to test your application with mocked customer and avoid to send data to the real evc.de API? By default, our bundle is created to use a requester service that embed Unirest/Request. In your `config/package/dev` repository, add new lines at the end of the `service.yaml` file. (Do not hesitate to create a new `service.yaml` file if there is no file yet. If you use flex to install this bundle, this is already done! :)

```
# config/packages/dev/service.yaml
# config/packages/test/service.yaml
services:
    alexandre_evc_request:
        class: Alexandre\EvcBundle\Service\EmulationService
        arguments:
            $api: '%env(EVC_API)%'
            $username: '%env(EVC_USERNAME)%'
            $password: '%env(EVC_PASSWORD)%'
```

Instead of calling the `RequesterService`, dev environment will use an `EmulationService`.

There is four declared customer.

- `11111` is the identifier of a customer that does not exists. Use it when you want to test your application with a non-existent customer
- `22222` customer exists, but he is not a personal user of your reseller. Use it when you want to test your application with a non-personal customer
- `33333` customer exists and he is a personal user with 42 credits.
- `44444` is a personal customer too. He has 42 credits too.
- `55555` Each time you call the 55555 customer, Emulation service will throw a `NetworkException`to test your application as if evc API wasn't reachable.
- `66666` Each time you call the 66666 customer, Emulation service will throw a `CredentialException` to test your application when your configuration is wrong.
- `77777` Each time you call the 77777 customer, Emulation service will throw a `LogicException`. We do not think it is useful, but if you want to test. A logic exception could be throw if API changes or if the answer is truncated.

Exceptions
----------

[](#exceptions)

- `NetworkException`: Network exceptions are thrown if evc.de is not reachable.
- `CredentialException`: Credential exceptions are thrown when you do a misconfiguration on your evc.de credentials.
- `LogicException`: Logical exceptions are thrown when evc.de is returning a not expected response. It could happen if there is a bug on this bundle, or if the api changes.
- `EvcException`: The three previous exceptions inherits the `EvcException`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Recently: every ~32 days

Total

6

Last Release

2190d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2381882da5c61a15c0123f6b1fd2048f638b0ca934609b7bfc4ed6d2905b55b?d=identicon)[Alexandre-T](/maintainers/Alexandre-T)

---

Top Contributors

[![Alexandre-T](https://avatars.githubusercontent.com/u/5101481?v=4)](https://github.com/Alexandre-T "Alexandre-T (72 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/alexandret-evc-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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