function XdebugHandler::checkConfiguration
Returns true if there are no known configuration issues
1 call to XdebugHandler::checkConfiguration()
- XdebugHandler::prepareRestart in vendor/
composer/ xdebug-handler/ src/ XdebugHandler.php - Returns the command line array if everything was written for the restart
File
-
vendor/
composer/ xdebug-handler/ src/ XdebugHandler.php, line 586
Class
- XdebugHandler
- @author John Stevenson <john-stevenson@blueyonder.co.uk>
Namespace
Composer\XdebugHandlerCode
private function checkConfiguration(?string &$info) : bool {
if (!function_exists('proc_open')) {
$info = 'proc_open function is disabled';
return false;
}
if (!file_exists(PHP_BINARY)) {
$info = 'PHP_BINARY is not available';
return false;
}
if (extension_loaded('uopz') && !(bool) ini_get('uopz.disable')) {
// uopz works at opcode level and disables exit calls
if (function_exists('uopz_allow_exit')) {
@uopz_allow_exit(true);
}
else {
$info = 'uopz extension is not compatible';
return false;
}
}
// Check UNC paths when using cmd.exe
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 70400) {
$workingDir = getcwd();
if ($workingDir === false) {
$info = 'unable to determine working directory';
return false;
}
if (0 === strpos($workingDir, '\\\\')) {
$info = 'cmd.exe does not support UNC paths: ' . $workingDir;
return false;
}
}
return true;
}