allow SSI fragments configuration in XML files
This commit is contained in:
parent
7cc97b6e0b
commit
99931a994b
@ -22,6 +22,7 @@
|
|||||||
<xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="csrf-protection" type="csrf_protection" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="csrf-protection" type="csrf_protection" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="esi" type="esi" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="esi" type="esi" minOccurs="0" maxOccurs="1" />
|
||||||
|
<xsd:element name="ssi" type="ssi" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="fragments" type="fragments" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="fragments" type="fragments" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="profiler" type="profiler" 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="router" type="router" minOccurs="0" maxOccurs="1" />
|
||||||
@ -64,6 +65,10 @@
|
|||||||
<xsd:attribute name="enabled" type="xsd:boolean" />
|
<xsd:attribute name="enabled" type="xsd:boolean" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ssi">
|
||||||
|
<xsd:attribute name="enabled" type="xsd:boolean" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="fragments">
|
<xsd:complexType name="fragments">
|
||||||
<xsd:attribute name="enabled" type="xsd:boolean" />
|
<xsd:attribute name="enabled" type="xsd:boolean" />
|
||||||
<xsd:attribute name="path" type="xsd:string" />
|
<xsd:attribute name="path" type="xsd:string" />
|
||||||
|
@ -16,6 +16,9 @@ $container->loadFromExtension('framework', array(
|
|||||||
'esi' => array(
|
'esi' => array(
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
),
|
),
|
||||||
|
'ssi' => array(
|
||||||
|
'enabled' => true,
|
||||||
|
),
|
||||||
'profiler' => array(
|
'profiler' => array(
|
||||||
'only_exceptions' => true,
|
'only_exceptions' => true,
|
||||||
'enabled' => false,
|
'enabled' => false,
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<framework:csrf-protection field-name="_csrf"/>
|
<framework:csrf-protection field-name="_csrf"/>
|
||||||
</framework:form>
|
</framework:form>
|
||||||
<framework:esi enabled="true" />
|
<framework:esi enabled="true" />
|
||||||
|
<framework:ssi enabled="true" />
|
||||||
<framework:profiler only-exceptions="true" enabled="false" />
|
<framework:profiler only-exceptions="true" enabled="false" />
|
||||||
<framework:router resource="%kernel.root_dir%/config/routing.xml" type="xml" />
|
<framework:router resource="%kernel.root_dir%/config/routing.xml" type="xml" />
|
||||||
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="true" save-path="/path/to/sessions" />
|
<framework:session gc-maxlifetime="90000" gc-probability="1" gc-divisor="108" storage-id="session.storage.native" handler-id="session.handler.native_file" name="_SYMFONY" cookie-lifetime="86400" cookie-path="/" cookie-domain="example.com" cookie-secure="true" cookie-httponly="true" save-path="/path/to/sessions" />
|
||||||
|
@ -10,6 +10,8 @@ framework:
|
|||||||
enabled: true
|
enabled: true
|
||||||
esi:
|
esi:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
ssi:
|
||||||
|
enabled: true
|
||||||
profiler:
|
profiler:
|
||||||
only_exceptions: true
|
only_exceptions: true
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -98,6 +98,13 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
$this->assertTrue($container->hasDefinition('esi'), '->registerEsiConfiguration() loads esi.xml');
|
$this->assertTrue($container->hasDefinition('esi'), '->registerEsiConfiguration() loads esi.xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSsi()
|
||||||
|
{
|
||||||
|
$container = $this->createContainerFromFile('full');
|
||||||
|
|
||||||
|
$this->assertTrue($container->hasDefinition('ssi'), '->registerSsiConfiguration() loads ssi.xml');
|
||||||
|
}
|
||||||
|
|
||||||
public function testEnabledProfiler()
|
public function testEnabledProfiler()
|
||||||
{
|
{
|
||||||
$container = $this->createContainerFromFile('profiler');
|
$container = $this->createContainerFromFile('profiler');
|
||||||
|
Reference in New Issue
Block a user