10000 [AssetMapper] Improving XSD to use attributes whenever possible · symfony/symfony@6326a5e · GitHub
[go: up one dir, main page]

Skip to content

Commit 6326a5e

Browse files
committed
[AssetMapper] Improving XSD to use attributes whenever possible
1 parent 9e82301 commit 6326a5e

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,17 @@
191191
<xsd:sequence>
192192
<xsd:element name="path" type="asset_mapper_path" minOccurs="0" maxOccurs="unbounded" />
193193
<xsd:element name="excluded-pattern" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
194-
<xsd:element name="server" type="xsd:boolean" minOccurs="0" />
195-
<xsd:element name="public_prefix" type="xsd:string" minOccurs="0" />
196-
<xsd:element name="strict-mode" type="xsd:boolean" minOccurs="0" />
197194
<xsd:element name="extension" type="asset_mapper_extension" minOccurs="0" maxOccurs="unbounded" />
198-
<xsd:element name="importmap-path" type="xsd:string" minOccurs="0" />
199-
<xsd:element name="importmap-polyfill" type="xsd:string" minOccurs="0" nillable="true" />
200195
<xsd:element name="importmap-script-attribute" type="asset_mapper_attribute" minOccurs="0" maxOccurs="unbounded" />
201-
<xsd:element name="vendor_dir" type="xsd:string" minOccurs="0" />
202-
<xsd:element name="provider" type="xsd:string" minOccurs="0" />
203196
</xsd:sequence>
197+
<xsd:attribute name="enabled" type="xsd:boolean" />
198+
<xsd:attribute name="server" type="xsd:boolean" />
199+
<xsd:attribute name="public-prefix" type="xsd:string" />
200+
<xsd:attribute name="strict-mode" type="xsd:boolean" />
201+
<xsd:attribute name="importmap-path" type="xsd:string" />
202+
<xsd:attribute name="importmap-polyfill" type="xsd:string" />
203+
<xsd:attribute name="vendor-dir" type="xsd:string" />
204+
<xsd:attribute name="provider" type="xsd:string" />
204205
</xsd:complexType>
205206

206207
<xsd:complexType name="asset_mapper_path" mixed="true">

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@
77
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
88

99
<framework:config http-method-override="false">
10-
<framework:asset-mapper>
10+
<framework:asset-mapper
11+
enabled="true"
12+
server="true"
13+
public-prefix="/assets_path/"
14+
strict-mode="true"
15+
importmap-path="%kernel.project_dir%/importmap.php"
16+
importmap-polyfill="https://cdn.example.com/polyfill.js"
17+
vendor-dir="%kernel.project_dir%/assets/vendor"
18+
provider="jspm"
19+
>
1120
<framework:path>assets/</framework:path>
1221
<framework:path namespace="my_namespace">assets2/</framework:path>
13-
<framework:excluded-pattern>*/*.scss</framework:excluded-pattern>
14-
<framework:server>true</framework:server>
15-
<framework:public_prefix>/assets_path/</framework:public_prefix>
16-
<framework:strict-mode>true</framework:strict-mode>
22+
<framework:excluded-pattern>*/assets/build/*</framework:excluded-pattern>
1723
<framework:extension extension="zip">application/zip</framework:extension>
18-
<framework:importmap-path>%kernel.project_dir%/importmap.php</framework:importmap-path>
19-
<framework:importmap-polyfill>https://cdn.example.com/polyfill.js</framework:importmap-polyfill>
2024
<framework:importmap-script-attribute key="data-turbo-track">reload</framework:importmap-script-attribute>
21-
<framework:vendor_dir>%kernel.project_dir%/assets/vendor</framework:vendor_dir>
22-
<framework:provider>jspm</framework:provider>
2325
</framework:asset-mapper>
2426
</framework:config>
2527
</container>

0 commit comments

Comments
 (0)
0