Skip to content

Commit

Permalink
short array syntax (#43)
Browse files Browse the repository at this point in the history
* short array syntax

* Add missing dependency

---------

Co-authored-by: Tim van Dijen <[email protected]>
  • Loading branch information
dnmvisser and tvdijen authored Jan 26, 2025
1 parent 221c99a commit 5ccb3a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"simplesamlphp/composer-module-installer": "^1.3.4",
"simplesamlphp/simplesamlphp": "^2.2.0",
"simplesamlphp/xml-common": "^1.16.0",
"symfony/http-foundation": "^6.4.0"
"symfony/http-foundation": "^6.4.0",
"symfony/var-exporter": "^6.4.0"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "^1.7.0"
Expand Down
3 changes: 2 additions & 1 deletion src/MetaLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use SimpleSAML\Metadata;
use SimpleSAML\Utils;
use SimpleSAML\XML\DOMDocumentFactory;
use Symfony\Component\VarExporter\VarExporter;

/**
* @package SimpleSAMLphp
Expand Down Expand Up @@ -620,7 +621,7 @@ public function writeMetadataFiles(string $outputDir): void
foreach ($elements as $m) {
$entityID = $m['metadata']['entityid'];
$content .= "\n" . '$metadata[\'';
$content .= addslashes($entityID) . '\'] = ' . var_export($m['metadata'], true) . ';' . "\n";
$content .= addslashes($entityID) . '\'] = ' . VarExporter::export($m['metadata']) . ';' . "\n";
}

$sysUtils = new Utils\System();
Expand Down

0 comments on commit 5ccb3a7

Please sign in to comment.