Skip to content

Commit 110bafa

Browse files
authored
Normalize the case of the SimpleXML requirement (#1881)
1 parent 9969891 commit 110bafa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"type": "library",
66
"require": {
77
"php": "^8.2",
8-
"ext-SimpleXML": "*",
98
"ext-dom": "*",
109
"ext-json": "*",
10+
"ext-simplexml": "*",
1111
"friendsofphp/php-cs-fixer": "~3.60.0",
1212
"nette/php-generator": "^3.6 || ^4.1",
1313
"nette/utils": "^3.0 || ^4.0",

src/File/ComposerWriter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function setRequirements(string $namespace, array $requirements, bool $cl
3636
unset(
3737
$content['require']['ext-json'],
3838
$content['require']['ext-dom'],
39-
$content['require']['ext-SimpleXML'],
39+
$content['require']['ext-SimpleXML'], // Older versions of the code generator were using that case. We keep cleaning it to avoid garbage.
40+
$content['require']['ext-simplexml'],
4041
$content['require']['ext-filter'],
4142
$content['require']['async-aws/core'],
4243
$content['require']['symfony/polyfill-uuid'],

src/Generator/ResponseParser/RestXmlParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function generate(StructureShape $shape, bool $throwOnError = true): Pars
9797
return new ParserResult('');
9898
}
9999

100-
$this->requirementsRegistry->addRequirement('ext-SimpleXML');
100+
$this->requirementsRegistry->addRequirement('ext-simplexml');
101101

102102
$body = '$data = new \SimpleXMLElement($response->getContent(' . ($throwOnError ? '' : 'false') . '));';
103103
if (!$throwOnError) {

0 commit comments

Comments
 (0)