8000 remove `service` parameter type from XSD · symfony/symfony@7333c2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7333c2d

Browse files
committed
remove service parameter type from XSD
Referencing a service in a parameter doesn't work and will lead to an error when the configuration is loaded.
1 parent b33d637 commit 7333c2d

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
<xsd:simpleType name="parameter_type">
157157
<xsd:restriction base="xsd:string">
158158
<xsd:enumeration value="collection" />
159-
<xsd:enumeration value="service" />
160159
<xsd:enumeration value="string" />
161160
<xsd:enumeration value="constant" />
162161
</xsd:restriction>

src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/services2.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<parameter>bar</parameter>
2424
</parameter>
2525
</parameter>
26-
<parameter key="foo_bar" type="service" id="foo_bar" />
2726
<parameter key="MixedCase" type="collection"> <!-- Should be lower cased -->
2827
<parameter key="MixedCaseKey">value</parameter> <!-- Should stay mixed case -->
2928
</parameter>

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testLoadParameters()
9999
$loader->load('services2.xml');
100100

101101
$actual = $container->getParameterBag()->all();
102-
$expected = array('a string', 'foo' => 'bar', 'values' => array(0, 'integer' => 4, 100 => null, 'true', true, false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', array('foo', 'bar')), 'foo_bar' => new Reference('foo_bar'), 'mixedcase' => array('MixedCaseKey' => 'value'));
102+
$expected = array('a string', 'foo' => 'bar', 'values' => array(0, 'integer' => 4, 100 => null, 'true', true, false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', array('foo', 'bar')), 'mixedcase' => array('MixedCaseKey' => 'value'));
103103

104104
$this->assertEquals($expected, $actual, '->load() converts XML values to PHP ones');
105105
}
@@ -120,7 +120,7 @@ public function testLoadImports()
120120
$loader->load('services4.xml');
121121

122122
$actual = $container->getParameterBag()->all();
123-
$expected = array('a string', 'foo' => 'bar', 'values' => array(true, false), 'foo_bar' => new Reference('foo_bar'), 'mixedcase' => array('MixedCaseKey' => 'value'), 'bar' => '%foo%', 'imported_from_ini' => true, 'imported_from_yaml' => true);
123+
$expected = array('a string', 'foo' => 'bar', 'values' => array(true, false), 'mixedcase' => array('MixedCaseKey' => 'value'), 'bar' => '%foo%', 'imported_from_ini' => true, 'imported_from_yaml' => true);
124124

125125
$this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files');
126126

0 commit comments

Comments
 (0)
0