PHPackages                             m6web/fos-rest-extra-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. m6web/fos-rest-extra-bundle

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

m6web/fos-rest-extra-bundle
===========================

Extra feature for the FOSRestBundle

v4.0.0(3y ago)1162.1k↑116.1%3[2 issues](https://github.com/BedrockStreaming/FOSRestExtraBundle/issues)[1 PRs](https://github.com/BedrockStreaming/FOSRestExtraBundle/pulls)PHPPHP ^7.4|^8.0

Since Jun 18Pushed 3y ago46 watchersCompare

[ Source](https://github.com/BedrockStreaming/FOSRestExtraBundle)[ Packagist](https://packagist.org/packages/m6web/fos-rest-extra-bundle)[ RSS](/packages/m6web-fos-rest-extra-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelog (9)Dependencies (8)Versions (12)Used By (0)

fos-rest-extra-bundle
=====================

[](#fos-rest-extra-bundle)

Provide extra feature for the [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle).

Dependency
----------

[](#dependency)

FOSRestExtraBundle requires [FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle).

Installation
------------

[](#installation)

Add this line in your composer.json:

```
{
    "require": {
        "m6web/fos-rest-extra-bundle": "~1.0"
    }
}
```

Update your vendors:

```
$ composer update m6web/fos-rest-extra-bundle
```

Add to your `AppKernel.php`:

```
new FOS\RestBundle\FOSRestBundle(),
new M6Web\Bundle\FOSRestExtraBundle\M6WebFOSRestExtraBundle(),
```

Then modify the FOSRestBundle configuration of your application to add :

```
fost_rest:
    param_fetcher_listener: true
```

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

[](#configuration)

```
m6_web_fos_rest_extra:
    param_fetcher:

        # Define if extra parameters are allowed. The behavior defined here is the default one and can
        # be overrided by a "RestrictExtraParam" annotation on the current action.
        # Optionnal, true by default
        allow_extra: true

        # Define if all parameters are strict. If true, all given parameters have to match defined
        # format for each on of them.
        # Optionnal, false by default
        strict: false

        # HTTP status code of throwed exception on query with invalid parameters
        # Optionnal, 400 by default
        error_status_code: 400
```

Usage
-----

[](#usage)

- `RestrictExtraParam(true/false)` Annotation : to allow (`false`) or forbid (`true`) unknown parameters, `true` by default.

```
use FOS\RestBundle\Controller\Annotations\QueryParam;
use M6Web\Bundle\FOSRestExtraBundle\Annotation\RestrictExtraParam;

/**
 * TestController
 */
class TestController
{
    /**
     * Restricted controller : only "param1" is permitted
     *
     * @return void
     *
     * @RestrictExtraParam(true)
     *
     * @QueryParam(name="param1", requirements="\d+", nullable=true, description="My Param 1")
     */
    public function getRestrictedAction() {

    }

    /**
     * Unrestricted controller : "param1" and unknown parameters are permitted
     * except if bundle configuration doesn't allow it
     *
     * @QueryParam(name="param1", requirements="\d+", nullable=true, description="My Param 1")
     *
     * @return void
     */
    public function getNonRestrictedAction() {

    }
}
```

Launch Tests
------------

[](#launch-tests)

```
$ bin/atoum
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~482 days

Total

11

Last Release

1443d ago

Major Versions

v1.1.0 → v2.0.02015-11-25

v2.3.1 → v3.0.02021-10-28

v3.0.0 → v4.0.02022-07-21

### Community

Maintainers

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

![](https://avatars.githubusercontent.com/u/5878620?v=4)[Fabien de Saint pern](/maintainers/fabdsp)[@fabdsp](https://github.com/fabdsp)

---

Top Contributors

[![lnahiro](https://avatars.githubusercontent.com/u/14995154?v=4)](https://github.com/lnahiro "lnahiro (3 commits)")[![fabdsp](https://avatars.githubusercontent.com/u/5878620?v=4)](https://github.com/fabdsp "fabdsp (3 commits)")[![omansour](https://avatars.githubusercontent.com/u/1131098?v=4)](https://github.com/omansour "omansour (3 commits)")[![t-geindre](https://avatars.githubusercontent.com/u/6348039?v=4)](https://github.com/t-geindre "t-geindre (2 commits)")[![DocRoms](https://avatars.githubusercontent.com/u/12815769?v=4)](https://github.com/DocRoms "DocRoms (2 commits)")[![Mandragora2](https://avatars.githubusercontent.com/u/1613191?v=4)](https://github.com/Mandragora2 "Mandragora2 (1 commits)")[![mikaelrandy](https://avatars.githubusercontent.com/u/187703?v=4)](https://github.com/mikaelrandy "mikaelrandy (1 commits)")[![jb-reynaud](https://avatars.githubusercontent.com/u/390431?v=4)](https://github.com/jb-reynaud "jb-reynaud (1 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/m6web-fos-rest-extra-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/m6web-fos-rest-extra-bundle/health.svg)](https://phpackages.com/packages/m6web-fos-rest-extra-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

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

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

8.5k5.9M737](/packages/sylius-sylius)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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