10000 bug #23271 [FrameworkBundle] allow SSI fragments configuration in XML… · symfony/symfony@a66b967 · GitHub
[go: up one dir, main page]

Skip to content

Commit a66b967

Browse files
committed
bug #23271 [FrameworkBundle] allow SSI fragments configuration in XML files (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] allow SSI fragments configuration in XML files | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 99931a9 allow SSI fragments configuration in XML files
2 parents 7cc97b6 + 99931a9 commit a66b967

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" />
2323
<xsd:element name="csrf-protection" type="csrf_protection" minOccurs="0" maxOccurs="1" />
2424
<xsd:element name="esi" type="esi" minOccurs="0" maxOccurs="1" />
25+
<xsd:element name="ssi" type="ssi" minOccurs="0" maxOccurs="1" />
2526
<xsd:element name="fragments" type="fragments" minOccurs="0" maxOccurs="1" />
26 10000 27
<xsd:element name="profiler" type="profiler" minOccurs="0" maxOccurs="1" />
2728
<xsd:element name="router" type="router" minOccurs="0" maxOccurs="1" />
@@ -64,6 +65,10 @@
6465
<xsd:attribute name="enabled" type="xsd:boolean" />
6566
</xsd:complexType>
6667

68+
<xsd:complexType name="ssi">
69+
<xsd:attribute name="enabled" type="xsd:boolean" />
70+
</xsd:complexType>
71+
6772
<xsd:complexType name="fragments">
6873
<xsd:attribute name="enabled" type="xsd:boolean" />
6974
<xsd:attribute name="path" type="xsd:string" />

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
'esi' => array(
1717
'enabled' => true,
1818
),
19+
'ssi' => array(
20+
'enabled' => true,
21+
),
1922
'profiler' => array(
2023
'only_exceptions' => true,
2124
'enabled' => false,

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/full.xml

Lines changed: 1 addition & 0 deletions
ED6F
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<framework:csrf-protection field-name="_csrf"/>
1313
</framework:form>
1414
<framework:esi enabled="true" />
15+
<framework:ssi enabled="true" />
1516
<framework:profiler only-exceptions="true" enabled="false" />
1617
<framework:router resource="%kernel.root_dir%/config/routing.xml" type="xml" />
1718
<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" />

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ framework:
1010
enabled: true
1111
esi:
1212
enabled: true
13+
ssi:
14+
enabled: true
1315
profiler:
1416
only_exceptions: true
1517
enabled: false

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ public function testEsi()
9898
$this->assertTrue($container->hasDefinition('esi'), '->registerEsiConfiguration() loads esi.xml');
9999
}
100100

101+
public function testSsi()
102+
{
103+
$container = $this->createContainerFromFile('full');
104+
105+
$this->assertTrue($container->hasDefinition('ssi'), '->registerSsiConfiguration() loads ssi.xml');
106+
}
107+
101108
public function testEnabledProfiler()
102109
{
103110
$container = $this->createContainerFromFile('profiler');

0 commit comments

Comments
 (0)
0