Skip to content

Commit 5ccb3a7

Browse files
dnmvissertvdijen
andauthored
short array syntax (#43)
* short array syntax * Add missing dependency --------- Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
1 parent 221c99a commit 5ccb3a7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"simplesamlphp/composer-module-installer": "^1.3.4",
4040
"simplesamlphp/simplesamlphp": "^2.2.0",
4141
"simplesamlphp/xml-common": "^1.16.0",
42-
"symfony/http-foundation": "^6.4.0"
42+
"symfony/http-foundation": "^6.4.0",
43+
"symfony/var-exporter": "^6.4.0"
4344
},
4445
"require-dev": {
4546
"simplesamlphp/simplesamlphp-test-framework": "^1.7.0"

src/MetaLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use SimpleSAML\Metadata;
1111
use SimpleSAML\Utils;
1212
use SimpleSAML\XML\DOMDocumentFactory;
13+
use Symfony\Component\VarExporter\VarExporter;
1314

1415
/**
1516
* @package SimpleSAMLphp
@@ -620,7 +621,7 @@ public function writeMetadataFiles(string $outputDir): void
620621
foreach ($elements as $m) {
621622
$entityID = $m['metadata']['entityid'];
622623
$content .= "\n" . '$metadata[\'';
623-
$content .= addslashes($entityID) . '\'] = ' . var_export($m['metadata'], true) . ';' . "\n";
624+
$content .= addslashes($entityID) . '\'] = ' . VarExporter::export($m['metadata']) . ';' . "\n";
624625
}
625626

626627
$sysUtils = new Utils\System();

0 commit comments

Comments
 (0)