-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[FrameworkBundle] Added configuration for additionnal request formats #8944
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
Changes from 1 commit
ebc22f5
c50d284
f019dec
f92b188
3cab8e2
2c5adea
5165d10
b41388e
05ccbdb
f769076
5f1dbfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,7 +236,7 @@ private function addRequestSection(ArrayNodeDefinition $rootNode) | |
->arrayNode('request') | ||
->info('request configuration') | ||
->canBeUnset() | ||
->fixXmlConfig('additionnal_format') | ||
->fixXmlConfig('additional-format') | ||
->children() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are missing the |
||
->arrayNode('additional_formats') | ||
->prototype('array') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are still missing the call to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok thanks, will do soon |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
<xsd:element name="fragments" type="fragments" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="profiler" type="profiler" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="router" type="router" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="request" type="request" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="session" type="session" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="templating" type="templating" minOccurs="0" maxOccurs="1" /> | ||
<xsd:element name="translator" type="translator" minOccurs="0" maxOccurs="1" /> | ||
|
@@ -93,6 +94,19 @@ | |
<xsd:attribute name="save-path" type="xsd:string" /> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="request"> | ||
<xsd:sequence> | ||
<xsd:element name="additional-format" type="additional-format" minOccurs="0" maxOccurs="unbounded" /> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
<xsd:complexType name="additional-format"> | ||
<xsd:all> | ||
<xsd:element name="mime-type" type="xsd:string" minOccurs="1" maxOccurs="unbounded" /> | ||
</xsd:all> | ||
<xsd:attribute name="name" type="xsd:string" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should mark this attribute as required as we use it as key There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok thanks I'll fix it. I'm still having issue finding the correct way to support https://github.com/symfony/symfony/pull/8944/files#L11R131 using xml. @docteurklein rose up the fact that it might not be possible (gquemener@b41388e#commitcomment-4065417), but the FrameworkExtensionTest architecture suggest that all configuration format should behave identically. Is it okay if it's not the case? I mean, is it ok if it's not possible to define multiple mime-types for a given format when using xml? |
||
</xsd:complexType> | ||
|
||
<xsd:complexType name="templating"> | ||
<xsd:sequence> | ||
<xsd:element name="loader" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should use an underscore as the transformation of dashes to underscores is handled by the Config component, and IIRC it happens before processing this