PHPackages                             satooshi/symfony2contrib-http-foundation-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. [HTTP &amp; Networking](/categories/http)
4. /
5. satooshi/symfony2contrib-http-foundation-extra-bundle

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

satooshi/symfony2contrib-http-foundation-extra-bundle
=====================================================

Symfony2 contrib http foundation extra bundle

0.1.1(13y ago)1321MITPHPPHP &gt;=5.3.0

Since Jan 21Pushed 13y ago1 watchersCompare

[ Source](https://github.com/satooshi/ContribHttpFoundationExtraBundle)[ Packagist](https://packagist.org/packages/satooshi/symfony2contrib-http-foundation-extra-bundle)[ Docs](https://github.com/satooshi/ContribHttpFoundationExtraBundle)[ RSS](/packages/satooshi-symfony2contrib-http-foundation-extra-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (1)

ContribHttpFoundationExtraBundle
================================

[](#contribhttpfoundationextrabundle)

Install
-------

[](#install)

See [Packagist](https://packagist.org/packages/satooshi/symfony2contrib-http-foundation-extra-bundle).

Annotation Usage
----------------

[](#annotation-usage)

This bundle contains the following annotations.

- @File: force to download a file.
- @Json: create JsonResponse from controller result.
    - Content-Type is
        - application/json for json response
        - text/javascript for jsonp response

```
# Acme/Bundle/Controller/SiteController.php

use Contrib\Bundle\HttpFoundationExtraBundle\Configuration\File;
use Contrib\Bundle\HttpFoundationExtraBundle\Configuration\Json;

/**
 * @Route("/site")
 */
class SiteController
{
    /**
     * @Route("/csv", name="site_csv")
     * @Method("GET")
     * @File(filename = "test.csv", charset = "Shift_JIS")
     */
    public function csvAction()
    {
        $content = 'item1,item2';

        return array(
            'content' => $content,

            // read file in FileResponse and ignore content if this was set to controller result
            //'path' => './test.csv',
        );
    }

    /**
     * @Route("/json", name="site_json")
     * @Method("GET")
     * @Json
     */
    public function jsonAction()
    {
    	// result response
    	// {"prop1":"value1","prop2":"value2"}
        return array(
        	'prop1' => 'value1',
        	'prop2' => 'value2'
        );
    }

    /**
     * @Route("/jsonp", name="site_jsonp")
     * @Method("GET")
     * @Json(callbackName = "jsoncallback")
     */
    public function jsonpAction()
    {
    	// request
    	// /site/jsonp?jsoncallback=mycallback
    	// response
    	// mycallback({"prop1":"value1","prop2":"value2"});
        return array(
        	'prop1' => 'value1',
        	'prop2' => 'value2'
        );
    }
}
```

### @File parameters

[](#file-parameters)

- filename: required if "content" was set to controller result. optional if "path" was set. used for "Content-Disposition" HTTP header
- charset: optional charactor encoding. used for "Content-Type" HTTP header
- mimeType: optional mime type. default value is "application/octet-stream". used for "Content-Type" HTTP header

### @Json parameters

[](#json-parameters)

- callbackName: optional callback request parameter name (default value: callback).
- serialize: optional boolean whether to use serializer ([jms/serializer](https://github.com/schmittjoh/serializer)).
- serializeGroups: optional array to use serialize group.

### todo

[](#todo)

- avoid HTTP header conflict if it has already been set
- add supecific file type annotation support (@Plain, @Csv, @Pdf, @Zip, and so on)
- add rendering template functionality as the same as @Template
- add DependencyInjection/Cofiguration to support default parameter configuration
- add unit test

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4866d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/160a656df3069db8f7d87d7ddc95e6977004697d21494a856ec0b8ae44248464?d=identicon)[satooshi](/maintainers/satooshi)

---

Tags

contrib

### Embed Badge

![Health badge](/badges/satooshi-symfony2contrib-http-foundation-extra-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/satooshi-symfony2contrib-http-foundation-extra-bundle/health.svg)](https://phpackages.com/packages/satooshi-symfony2contrib-http-foundation-extra-bundle)
```

###  Alternatives

[willdurand/hateoas-bundle

Integration of Hateoas into Symfony2.

29815.2M48](/packages/willdurand-hateoas-bundle)[srio/rest-upload-bundle

Handle multiple rest upload ways

46124.8k](/packages/srio-rest-upload-bundle)[aboutcoders/job-bundle

A symfony bundle for asynchronous job processing.

2618.0k1](/packages/aboutcoders-job-bundle)[pumukit/pumukit

Media Portal

5714.0k37](/packages/pumukit-pumukit)[ecentria/ecentria-rest-bundle

Goal of this bundle is to simplify process of creating APIs with Symfony. We use already well-coded libraries, combine them together to simplify process and not to re-invent the wheel. We've chose REST and HATEOS to have unified standards of API requests and responses.

142.4k](/packages/ecentria-ecentria-rest-bundle)[ideasoft/http-batch-bundle

Http batch server implementation for symfony via sub requests.

2520.4k](/packages/ideasoft-http-batch-bundle)

PHPackages © 2026

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