Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
gquemener opened this Issue · 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
Owner

:+1:

@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 :wink:

@fabpot fabpot referenced this issue from a commit
@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
@fabpot fabpot referenced this issue from a commit in symfony/FrameworkBundle
@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 referenced this issue from a commit in symfony/HttpKernel
@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 referenced this issue from a commit in symfony/symfony-docs
@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 referenced this issue from a commit in symfony/FrameworkBundle
@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.