You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature symfony#23485 [Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse (Basster)
This PR was squashed before being merged into the 3.4 branch (closessymfony#23485).
Discussion
----------
[Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I needed the xml parsing for an XML string generated in memory, so I extracted the actual parsing from XmlUtils::loadFile into XmlUtils::load.
Re-opened after I messed some things up in symfony#23482
Commits
-------
7473981 [Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse
@@ -29,27 +33,23 @@ private function __construct()
29
33
}
30
34
31
35
/**
32
-
* Loads an XML file.
36
+
* Parses an XML string.
33
37
*
34
-
* @param string $fileAn XML file path
38
+
* @param string $content An XML string
35
39
* @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation
36
40
*
37
41
* @return \DOMDocument
38
42
*
39
-
* @throws \InvalidArgumentException When loading of XML file returns error
40
-
* @throws \RuntimeException When DOM extension is missing
43
+
* @throws \Symfony\Component\Config\Util\Exception\XmlParsingException When parsing of XML file returns error
44
+
* @throws \Symfony\Component\Config\Util\Exception\InvalidXmlException When parsing of XML with schema or callable produces any errors unrelated to the XML parsing itself
45
+
* @throws \RuntimeException When DOM extension is missing
0 commit comments