Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

@gquemener
Copy link
Contributor

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
Copy link
Member

fabpot commented Sep 5, 2013

👍

@gquemener
Copy link
Contributor Author

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 added a commit that referenced this issue Feb 20, 2014
…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
@fabpot fabpot closed this as completed Feb 20, 2014
fabpot added a commit to symfony/framework-bundle that referenced this issue Feb 20, 2014
…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
fabpot added a commit to symfony/http-kernel that referenced this issue Feb 20, 2014
…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
weaverryan added a commit to symfony/symfony-docs that referenced this issue Mar 18, 2014
…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
fabpot added a commit to symfony/framework-bundle that referenced this issue Nov 11, 2014
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants