Skip to content

Commit 1697bef

Browse files
committed
Fix for windows - attempt 3
1 parent c03bbf5 commit 1697bef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/spec/ReferenceTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,10 @@ public function testResolveFileHttp()
274274
// $file = 'https://raw.githubusercontent.com/cebe/php-openapi/290389bbd337cf4d70ecedfd3a3d886715e19552/tests/spec/data/reference/base.yaml';
275275

276276
if (stripos(PHP_OS_FAMILY, 'Windows') !== false) {
277-
exec('pwsh -Command "Start-Process php -ArgumentList \'-S localhost:8787\' -NoNewWindow"', $op);
277+
// exec('pwsh -Command "Start-Process php -ArgumentList \'-S localhost:8787\' -NoNewWindow"', $op);
278+
$cmd = 'powershell -Command "Start-Process php -ArgumentList \'-S localhost:8787\' -NoNewWindow"';
279+
popen($cmd, "r");
280+
278281
} else {
279282
exec('nohup php -S localhost:8787 > /dev/null 2>&1 &', $op);
280283
}

0 commit comments

Comments
 (0)