PHPackages                             cmrweb/request-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. cmrweb/request-bundle

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

cmrweb/request-bundle
=====================

Symfony request hepler bundle

0.04(4mo ago)02911MITPHP

Since Nov 22Pushed 3mo agoCompare

[ Source](https://github.com/cmrweb/RequestBundle)[ Packagist](https://packagist.org/packages/cmrweb/request-bundle)[ RSS](/packages/cmrweb-request-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (1)

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, enter your project directory and execute:

```
composer require cmrweb/request-bundle
```

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 cmrweb/request-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 [
    // ...
    Cmrweb\RequestBundle\RequestBundle::class => ['all' => true],
];
```

### Config

[](#config)

.env

```
###> cmrweb/request-bundle ###
API_ROOT_URL="https://.../"
API_KEY="MySuperSecureApiKey"
###< cmrweb/request-bundle ###
```

config/services.yaml

```
parameters:
    # ...
    cmrweb.api.url: '%env(API_ROOT_URL)%'
    cmrweb.api.key: '%env(API_KEY)%'
services:
    # ...
    App\Service\MyRequestService:
            arguments:
                $url: '%cmrweb.api.url%'
```

### usage

[](#usage)

```
namespace App\Service;

use Cmrweb\RequestBundle\AbstractApiRequest;

class MyRequestService extends AbstractApiRequest
{
    private const string AUTOCOMPLETE = 'autocomplete';
    private const string SEARCH = 'search';

    private const array ROUTES = [
        self::AUTOCOMPLETE => 'geocodage/completion/',
        self::SEARCH => 'geocodage/search'
    ];
    // ...
    public function autocomplete(string $term): ?array
    {
        $request = $this->apiRequest(self::AUTOCOMPLETE, [
            'text' => $term,
            'type' => 'StreetAddress'
        ]);
        return $request['results'] ?? null;
    }
    // ...
    # call AbstractApiRequest method from apiRequest
    protected function apiRequest(string $request, ?array $context = null): array
    {
        return $this->get(self::ROUTES[$request], $context)->getData();
    }
```

apiRequest methods

```
    public function post(string $route, ?array $options = []): static;
    public function get(string $route, ?array $context = null, ?array $options = []): static;
    public function getCurl(string $route, array $context, ?array $auth = null): static;
```

Get your API key from parameters

```
protected function apiRequest(string $request, ?array $context = null): array
{
    return $this->get($type, $context, [
            'headers' => [
                'Content-Type' => 'application/json',
                'MY-API-KEY' => $this->param->get('cmrweb.api.key')
            ]
        ])->getData();
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance77

Regular maintenance activity

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

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

Total

4

Last Release

128d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33638879?v=4)[cmrweb](/maintainers/cmrweb)[@cmrweb](https://github.com/cmrweb)

---

Top Contributors

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

---

Tags

apicurlhelperhttp-requestssymfony-bundle

### Embed Badge

![Health badge](/badges/cmrweb-request-bundle/health.svg)

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

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[easycorp/easyadmin-demo

EasyAdmin Demo Application

145.7k](/packages/easycorp-easyadmin-demo)

PHPackages © 2026

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