diff --git a/composer.json b/composer.json index 09f58a1e6..856d19f68 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "league/flysystem": "^1.0|2.1.1|^3.0", "league/mime-type-detection": "^1.0", "oat-sa/lib-beeme": "0.2.0", - "wp-cli/php-cli-tools": "0.10.3" + "wp-cli/php-cli-tools": "0.11.22" }, "require-dev": { "phpunit/phpunit": "~9|~7", diff --git a/src/qtism/cli/Render.php b/src/qtism/cli/Render.php index 259e9711f..23bd9a925 100644 --- a/src/qtism/cli/Render.php +++ b/src/qtism/cli/Render.php @@ -33,6 +33,7 @@ use qtism\runtime\rendering\markup\goldilocks\GoldilocksRenderingEngine; use qtism\runtime\rendering\markup\xhtml\XhtmlRenderingEngine; use qtism\runtime\rendering\RenderingException; +use qtism\data\storage\xml\filesystem\FilesystemFactory; /** * Render CLI Module. @@ -167,6 +168,7 @@ protected function run(): void // Load XML Document. $source = $arguments['source']; $doc = new XmlDocument(); + $doc->setFileSystem(FilesystemFactory::local(getcwd())); $validate = !($arguments['novalidate'] === true); try { @@ -280,14 +282,14 @@ private function runGoldilocks(XmlDocument $doc, GoldilocksRenderingEngine $rend $body = substr($body, 0, strlen('') * -1); $body = "{$nl}"; } else { - $body = $xml->saveXml($xml->documentElement) . {$nl}; + $body = $xml->saveXml($xml->documentElement) . $nl; } if ($arguments['document'] === true) { $footer = "\n"; } } else { - $body = $xml->saveXml($xml->documentElement) . {$nl}; + $body = $xml->saveXml($xml->documentElement) . $nl; } // Indent body... @@ -358,7 +360,7 @@ private function runXhtml(XmlDocument $doc, XhtmlRenderingEngine $renderer): str $footer .= "\n"; } - $body = $xml->saveXml($xml->documentElement) . {$nl}; + $body = $xml->saveXml($xml->documentElement) . $nl; // Indent body... $indentBody = '';