Skip to content

Commit 91cfd52

Browse files
[FrameworkBundle] fix "samesite" in XSD
1 parent d4e8977 commit 91cfd52

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

DependencyInjection/Configuration.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
491491
->scalarNode('cookie_domain')->end()
492492
->booleanNode('cookie_secure')->end()
493493
->booleanNode('cookie_httponly')->defaultTrue()->end()
494-
->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT])->defaultNull()->end()
494+
->enumNode('cookie_samesite')->values([null, Cookie::SAMESITE_LAX, Cookie::SAMESITE_STRICT, Cookie::SAMESITE_NONE])->defaultNull()->end()
495495
->booleanNode('use_cookies')->end()
496496
->scalarNode('gc_divisor')->end()
497497
->scalarNode('gc_probability')->defaultValue(1)->end()

Resources/config/schema/symfony-1.0.xsd

+10
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
<xsd:attribute name="cookie-domain" type="xsd:string" />
114114
<xsd:attribute name="cookie-secure" type="xsd:boolean" />
115115
<xsd:attribute name="cookie-httponly" type="xsd:boolean" />
116+
<xsd:attribute name="cookie-samesite" type="cookie_samesite" />
116117
<xsd:attribute name="use-cookies" type="xsd:boolean" />
117118
<xsd:attribute name="cache-limiter" type="xsd:string" />
118119
<xsd:attribute name="gc-maxlifetime" type="xsd:string" />
@@ -306,6 +307,15 @@
306307
<xsd:attribute name="name" type="xsd:string" use="required" />
307308
</xsd:complexType>
308309

310+
<xsd:simpleType name="cookie_samesite">
311+
<xsd:restriction base="xsd:string">
312+
<xsd:enumeration value="" />
313+
<xsd:enumeration value="none" />
314+
<xsd:enumeration value="lax" />
315+
<xsd:enumeration value="strict" />
316+
</xsd:restriction>
317+
</xsd:simpleType>
318+
309319
<xsd:simpleType name="workflow_type">
310320
<xsd:restriction base="xsd:string">
311321
<xsd:enumeration value="state_machine" />

0 commit comments

Comments
 (0)