Skip to content

Commit 840575b

Browse files
committed
Improve docs for future me
1 parent b5a6c99 commit 840575b

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The result of this loader is a completely flattened WSDL file which you can e.g.
6666
use Soap\Wsdl\Loader\FlatteningLoader;
6767
use Soap\Wsdl\Loader\StreamWrapperLoader;
6868

69-
$loader = FlatteningLoader::createForLoader(new StreamWrapperLoader());
69+
$loader = new FlatteningLoader(new StreamWrapperLoader());
7070

7171
$contents = $loader($wsdl);
7272
```

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
</projectFiles>
2323
<ignoreExceptions>
2424
<class name="InvalidArgumentException" />
25+
<class name="Psl\Exception\InvariantViolationException" />
2526
</ignoreExceptions>
2627
</psalm>

src/Xml/Configurator/FlattenTypes.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
use function VeeWee\Xml\Dom\Manipulator\append;
1616
use function VeeWee\Xml\Dom\Manipulator\Node\remove;
1717

18+
/**
19+
* This class transforms multiple wsdl:types elements into 1 single element.
20+
* This makes importing xsd's easier (and prevents some bugs in some soap related tools)
21+
*/
1822
final class FlattenTypes implements Configurator
1923
{
2024
/**

src/Xml/Configurator/FlattenXsdImports.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use DOMDocument;
88
use DOMElement;
99
use DOMNode;
10-
use Psl\Exception\InvariantViolationException;
1110
use Psl\Type\Exception\AssertException;
1211
use Soap\Wsdl\Exception\UnloadableWsdlException;
1312
use Soap\Wsdl\Loader\Context\FlatteningContext;
@@ -25,10 +24,8 @@
2524
use function VeeWee\Xml\Dom\Manipulator\Node\remove;
2625

2726
/**
28-
* @TODO check https://github.com/pkielgithub/SchemaLightener/blob/master/src/SchemaLightener.java implementation
29-
* -> http://www.strategicdevelopment.io/tools/index.php
30-
* -> http://www.strategicdevelopment.io/tools/SchemaLightener.php
31-
* -> http://www.strategicdevelopment.io/tools/WSDLFlattener.php
27+
* This class deals with xsd:import, xsd:include and xsd:redefine tags.
28+
* It imports the types grouped by schema namespace to make sure that the size of the result is as small as possible!
3229
*/
3330
final class FlattenXsdImports implements Configurator
3431
{
@@ -176,7 +173,6 @@ private function loadSchema(string $location): ?DOMElement
176173
* It groups all imports by targetNamespace.
177174
*
178175
* @throws RuntimeException
179-
* @throws InvariantViolationException
180176
* @throws AssertException
181177
*/
182178
private function registerSchemaInTypes(DOMElement $schema): void

0 commit comments

Comments
 (0)