Skip to content

[FrameworkBundle] Allow to add new request formats through configuration #8934

Closed
gquemener opened this Issue Sep 5, 2013 · 2 comments

2 participants

@gquemener

Currently, one who wants to register a new Request format has to declare its own listener (see http://symfony.com/doc/current/cookbook/request/mime_type.html).
Why not defining one in the FrameworkBundle and using configurations to declare this new formats?

If this is accepted, I can manage to do it.

@fabpot
Symfony member
fabpot commented Sep 5, 2013

👍

@gquemener

About configuration, I was thinking about something similar to:

framework:
    request:
        additional_formats:
            csv: ["text/csv", "text/plain"]
            pdf: "application/pdf"

What do you think before I dive into the Configuration class 😉

@fabpot fabpot added a commit that referenced this issue Feb 20, 2014
@fabpot fabpot feature #9862 [FrameworkBundle] Added configuration for additionnal r…
…equest formats (gquemener)

This PR was squashed before being merged into the 2.5-dev branch (closes #9862).

Discussion
----------

[FrameworkBundle] Added configuration for additionnal request formats

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8934
| License       | MIT
| Doc PR        |  symfony/symfony-docs#3402

Reopening of #8944

# TODO
  - [x] Fix wrong xml configuration definition (Thanks @WouterJ)
  - [x] Change configuration key `additional_formats` to a more meaningful one
  - [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)

Commits
-------

f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
aca3271
@fabpot fabpot closed this Feb 20, 2014
@fabpot fabpot added a commit to symfony/framework-bundle that referenced this issue Feb 20, 2014
@fabpot fabpot feature #9862 [FrameworkBundle] Added configuration for additionnal r…
…equest formats (gquemener)

This PR was squashed before being merged into the 2.5-dev branch (closes #9862).

Discussion
----------

[FrameworkBundle] Added configuration for additionnal request formats

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony/symfony#8934
| License       | MIT
| Doc PR        |  symfony/symfony-docs#3402

Reopening of symfony/symfony#8944

# TODO
  - [x] Fix wrong xml configuration definition (Thanks @WouterJ)
  - [x] Change configuration key `additional_formats` to a more meaningful one
  - [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)

Commits
-------

f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
b25aa0c
@fabpot fabpot added a commit to symfony/http-kernel that referenced this issue Feb 20, 2014
@fabpot fabpot feature #9862 [FrameworkBundle] Added configuration for additionnal r…
…equest formats (gquemener)

This PR was squashed before being merged into the 2.5-dev branch (closes #9862).

Discussion
----------

[FrameworkBundle] Added configuration for additionnal request formats

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony/symfony#8934
| License       | MIT
| Doc PR        |  symfony/symfony-docs#3402

Reopening of symfony/symfony#8944

# TODO
  - [x] Fix wrong xml configuration definition (Thanks @WouterJ)
  - [x] Change configuration key `additional_formats` to a more meaningful one
  - [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)

Commits
-------

f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
936b9e5
@weaverryan weaverryan added a commit to symfony/symfony-docs that referenced this issue Mar 18, 2014
@weaverryan weaverryan feature #3402 Added documentation about new requests formats configur…
…ation (gquemener)

This PR was merged into the master branch.

Discussion
----------

Added documentation about new requests formats configuration

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes (symfony/symfony#9862)
| Applies to    | 2.5
| Fixed tickets | symfony/symfony#8934

Commits
-------

6adf160 Added documentation about new requests formats configuration
dcf8e6e
@fabpot fabpot added a commit to symfony/framework-bundle that referenced this issue Nov 11, 2014
@fabpot fabpot feature #9862 [FrameworkBundle] Added configuration for additionnal r…
…equest formats (gquemener)

This PR was squashed before being merged into the 2.5-dev branch (closes #9862).

Discussion
----------

[FrameworkBundle] Added configuration for additionnal request formats

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | symfony/symfony#8934
| License       | MIT
| Doc PR        |  symfony/symfony-docs#3402

Reopening of symfony/symfony#8944

# TODO
  - [x] Fix wrong xml configuration definition (Thanks @WouterJ)
  - [x] Change configuration key `additional_formats` to a more meaningful one
  - [x] Write documentation (new entry or replace http://symfony.com/doc/current/cookbook/request/mime_type.html ?)

Commits
-------

f90ba11 [FrameworkBundle] Added configuration for additionnal request formats
3a9e3fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.