Skip to content

Commit

Permalink
Remove workaround for Windows (will revert immediately if Windows bui…
Browse files Browse the repository at this point in the history
…ld fails on GitHub Actions)
  • Loading branch information
sebastianbergmann committed Jan 7, 2024
1 parent 8a01c35 commit 915dac4
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/Util/Xml/Loader.php
Expand Up @@ -9,11 +9,8 @@
*/
namespace PHPUnit\Util\Xml;

use function chdir;
use function dirname;
use function error_reporting;
use function file_get_contents;
use function getcwd;
use function libxml_get_errors;
use function libxml_use_internal_errors;
use function sprintf;
Expand Down Expand Up @@ -73,12 +70,6 @@ public function load(string $actual, ?string $filename = null): DOMDocument

// Required for XInclude
if ($filename !== null) {
// Required for XInclude on Windows
if (PHP_OS_FAMILY === 'Windows') {
$cwd = getcwd();
@chdir(dirname($filename));
}

$document->documentURI = $filename;
}

Expand All @@ -95,10 +86,6 @@ public function load(string $actual, ?string $filename = null): DOMDocument
libxml_use_internal_errors($internal);
error_reporting($reporting);

if (isset($cwd)) {
@chdir($cwd);
}

if ($loaded === false || $message !== '') {
if ($filename !== null) {
throw new XmlException(
Expand Down

0 comments on commit 915dac4

Please sign in to comment.