Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XdebugHandler.php

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\XdebugHandler

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal