Merge branch '1.3'
commit
033ceb4faa
|
@ -63,7 +63,10 @@ class XdebugHandler
|
||||||
$args = explode('|', strval(getenv(self::ENV_ALLOW)), 2);
|
$args = explode('|', strval(getenv(self::ENV_ALLOW)), 2);
|
||||||
|
|
||||||
if ($this->needsRestart($args[0])) {
|
if ($this->needsRestart($args[0])) {
|
||||||
$this->prepareRestart($command) && $this->restart($command);
|
if ($this->prepareRestart()) {
|
||||||
|
$command = $this->getCommand();
|
||||||
|
$this->restart($command);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,18 +130,15 @@ class XdebugHandler
|
||||||
* - tmp ini file creation
|
* - tmp ini file creation
|
||||||
* - environment variable creation
|
* - environment variable creation
|
||||||
*
|
*
|
||||||
* @param null|string $command The command to run, set by method
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function prepareRestart(&$command)
|
private function prepareRestart()
|
||||||
{
|
{
|
||||||
$this->tmpIni = '';
|
$this->tmpIni = '';
|
||||||
$iniPaths = IniHelper::getAll();
|
$iniPaths = IniHelper::getAll();
|
||||||
$files = $this->getWorkingSet($iniPaths, $replace);
|
$files = $this->getWorkingSet($iniPaths, $replace);
|
||||||
|
|
||||||
if ($this->writeTmpIni($files, $replace)) {
|
if ($this->writeTmpIni($files, $replace)) {
|
||||||
$command = $this->getCommand();
|
|
||||||
return $this->setEnvironment($iniPaths);
|
return $this->setEnvironment($iniPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ class XdebugHandler
|
||||||
$content .= $this->getIniData($file, $replace);
|
$content .= $this->getIniData($file, $replace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content .= PHP_EOL.'memory_limit='.ini_get('memory_limit').PHP_EOL;
|
||||||
|
|
||||||
return @file_put_contents($this->tmpIni, $content);
|
return @file_put_contents($this->tmpIni, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue