allow SSI fragments configuration in XML files

This commit is contained in:
Christian Flothmann 2017-06-22 21:48:55 +02:00
parent 7cc97b6e0b
commit 99931a994b
5 changed files with 18 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<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="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="profiler" type="profiler" 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:complexType>
<xsd:complexType name="ssi">
<xsd:attribute name="enabled" type="xsd:boolean" />
</xsd:complexType>
<xsd:complexType name="fragments">
<xsd:attribute name="enabled" type="xsd:boolean" />
<xsd:attribute name="path" type="xsd:string" />

View File

@ -16,6 +16,9 @@ $container->loadFromExtension('framework', array(
'esi' => array(
'enabled' => true,
),
'ssi' => array(
'enabled' => true,
),
'profiler' => array(
'only_exceptions' => true,
'enabled' => false,

View File

@ -12,6 +12,7 @@
<framework:csrf-protection field-name="_csrf"/>
</framework:form>
<framework:esi enabled="true" />
<framework:ssi enabled="true" />
<framework:profiler only-exceptions="true" enabled="false" />
<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" />

View File

@ -10,6 +10,8 @@ framework:
enabled: true
esi:
enabled: true
ssi:
enabled: true
profiler:
only_exceptions: true
enabled: false

View File

@ -98,6 +98,13 @@ abstract class FrameworkExtensionTest extends TestCase
$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()
{
$container = $this->createContainerFromFile('profiler');