mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Dependency updates and update version number
This commit is contained in:
@@ -184,10 +184,11 @@ class SplCaster
|
||||
$storage = array();
|
||||
unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967
|
||||
|
||||
foreach (clone $c as $obj) {
|
||||
$clone = clone $c;
|
||||
foreach ($clone as $obj) {
|
||||
$storage[spl_object_hash($obj)] = array(
|
||||
'object' => $obj,
|
||||
'info' => $c->getInfo(),
|
||||
'info' => $clone->getInfo(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
2
vendor/symfony/var-dumper/Cloner/Data.php
vendored
2
vendor/symfony/var-dumper/Cloner/Data.php
vendored
@@ -227,7 +227,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
*
|
||||
* @param string|int $key The key to seek to
|
||||
*
|
||||
* @return self|null A clone of $this of null if the key is not set
|
||||
* @return self|null A clone of $this or null if the key is not set
|
||||
*/
|
||||
public function seek($key)
|
||||
{
|
||||
|
||||
87
vendor/symfony/var-dumper/Dumper/CliDumper.php
vendored
87
vendor/symfony/var-dumper/Dumper/CliDumper.php
vendored
@@ -62,7 +62,7 @@ class CliDumper extends AbstractDumper
|
||||
{
|
||||
parent::__construct($output, $charset, $flags);
|
||||
|
||||
if ('\\' === DIRECTORY_SEPARATOR && 'ON' !== @getenv('ConEmuANSI') && 'xterm' !== @getenv('TERM')) {
|
||||
if ('\\' === DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) {
|
||||
// Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI
|
||||
$this->setStyles(array(
|
||||
'default' => '31',
|
||||
@@ -467,7 +467,7 @@ class CliDumper extends AbstractDumper
|
||||
protected function supportsColors()
|
||||
{
|
||||
if ($this->outputStream !== static::$defaultOutput) {
|
||||
return @(is_resource($this->outputStream) && function_exists('posix_isatty') && posix_isatty($this->outputStream));
|
||||
return $this->hasColorSupport($this->outputStream);
|
||||
}
|
||||
if (null !== static::$defaultColors) {
|
||||
return static::$defaultColors;
|
||||
@@ -495,22 +495,10 @@ class CliDumper extends AbstractDumper
|
||||
}
|
||||
}
|
||||
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
static::$defaultColors = @(
|
||||
'10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD
|
||||
|| false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM')
|
||||
);
|
||||
} elseif (function_exists('posix_isatty')) {
|
||||
$h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null);
|
||||
$h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream;
|
||||
static::$defaultColors = @posix_isatty($h);
|
||||
} else {
|
||||
static::$defaultColors = false;
|
||||
}
|
||||
$h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null);
|
||||
$h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream;
|
||||
|
||||
return static::$defaultColors;
|
||||
return static::$defaultColors = $this->hasColorSupport($h);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -536,4 +524,69 @@ class CliDumper extends AbstractDumper
|
||||
|
||||
$this->dumpLine($cursor->depth, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the stream supports colorization.
|
||||
*
|
||||
* Reference: Composer\XdebugHandler\Process::supportsColor
|
||||
* https://github.com/composer/xdebug-handler
|
||||
*
|
||||
* @param mixed $stream A CLI output stream
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hasColorSupport($stream)
|
||||
{
|
||||
if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DIRECTORY_SEPARATOR === '\\') {
|
||||
return (function_exists('sapi_windows_vt100_support')
|
||||
&& @sapi_windows_vt100_support($stream))
|
||||
|| false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
}
|
||||
|
||||
if (function_exists('stream_isatty')) {
|
||||
return @stream_isatty($stream);
|
||||
}
|
||||
|
||||
if (function_exists('posix_isatty')) {
|
||||
return @posix_isatty($stream);
|
||||
}
|
||||
|
||||
$stat = @fstat($stream);
|
||||
// Check if formatted mode is S_IFCHR
|
||||
return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the Windows terminal supports true color.
|
||||
*
|
||||
* Note that this does not check an output stream, but relies on environment
|
||||
* variables from known implementations, or a PHP and Windows version that
|
||||
* supports true color.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isWindowsTrueColor()
|
||||
{
|
||||
$result = 183 <= getenv('ANSICON_VER')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
|
||||
if (!$result && PHP_VERSION_ID >= 70200) {
|
||||
$version = sprintf(
|
||||
'%s.%s.%s',
|
||||
PHP_WINDOWS_VERSION_MAJOR,
|
||||
PHP_WINDOWS_VERSION_MINOR,
|
||||
PHP_WINDOWS_VERSION_BUILD
|
||||
);
|
||||
$result = $version >= '10.0.15063';
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
13
vendor/symfony/var-dumper/Dumper/HtmlDumper.php
vendored
13
vendor/symfony/var-dumper/Dumper/HtmlDumper.php
vendored
@@ -310,6 +310,9 @@ return function (root, x) {
|
||||
|
||||
return "concat(" + parts.join(",") + ", '')";
|
||||
}
|
||||
function xpathHasClass(className) {
|
||||
return "contains(concat(' ', normalize-space(@class), ' '), ' " + className +" ')";
|
||||
}
|
||||
addEventListener(root, 'mouseover', function (e) {
|
||||
if ('' != refStyle.innerHTML) {
|
||||
refStyle.innerHTML = '';
|
||||
@@ -516,7 +519,15 @@ return function (root, x) {
|
||||
return;
|
||||
}
|
||||
|
||||
var xpathResult = doc.evaluate('//pre[@id="' + root.id + '"]//span[@class="sf-dump-str" or @class="sf-dump-key" or @class="sf-dump-public" or @class="sf-dump-protected" or @class="sf-dump-private"][contains(translate(child::text(), ' + xpathString(searchQuery.toUpperCase()) + ', ' + xpathString(searchQuery.toLowerCase()) + '), ' + xpathString(searchQuery.toLowerCase()) + ')]', document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
|
||||
var classMatches = [
|
||||
"sf-dump-str",
|
||||
"sf-dump-key",
|
||||
"sf-dump-public",
|
||||
"sf-dump-protected",
|
||||
"sf-dump-private",
|
||||
].map(xpathHasClass).join(' or ');
|
||||
|
||||
var xpathResult = doc.evaluate('.//span[' + classMatches + '][contains(translate(child::text(), ' + xpathString(searchQuery.toUpperCase()) + ', ' + xpathString(searchQuery.toLowerCase()) + '), ' + xpathString(searchQuery.toLowerCase()) + ')]', root, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
|
||||
|
||||
while (node = xpathResult.iterateNext()) state.nodes.push(node);
|
||||
|
||||
|
||||
@@ -126,6 +126,10 @@ EODUMP;
|
||||
|
||||
public function testHtmlDump()
|
||||
{
|
||||
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
|
||||
$this->markTestSkipped('A custom file_link_format is defined.');
|
||||
}
|
||||
|
||||
$e = $this->getTestException(1);
|
||||
ExceptionCaster::$srcContext = -1;
|
||||
|
||||
|
||||
@@ -144,4 +144,23 @@ EOTXT;
|
||||
array(\SplDoublyLinkedList::IT_MODE_LIFO | \SplDoublyLinkedList::IT_MODE_DELETE, 'IT_MODE_LIFO | IT_MODE_DELETE'),
|
||||
);
|
||||
}
|
||||
|
||||
public function testCastObjectStorageIsntModified()
|
||||
{
|
||||
$var = new \SplObjectStorage();
|
||||
$var->attach(new \stdClass());
|
||||
$var->rewind();
|
||||
$current = $var->current();
|
||||
|
||||
$this->assertDumpMatchesFormat('%A', $var);
|
||||
$this->assertSame($current, $var->current());
|
||||
}
|
||||
|
||||
public function testCastObjectStorageDumpsInfo()
|
||||
{
|
||||
$var = new \SplObjectStorage();
|
||||
$var->attach(new \stdClass(), new \DateTime());
|
||||
|
||||
$this->assertDumpMatchesFormat('%ADateTime%A', $var);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,10 @@ class HtmlDumperTest extends TestCase
|
||||
{
|
||||
public function testGet()
|
||||
{
|
||||
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
|
||||
$this->markTestSkipped('A custom file_link_format is defined.');
|
||||
}
|
||||
|
||||
require __DIR__.'/../Fixtures/dumb-var.php';
|
||||
|
||||
$dumper = new HtmlDumper('php://output');
|
||||
|
||||
2
vendor/symfony/var-dumper/VarDumper.php
vendored
2
vendor/symfony/var-dumper/VarDumper.php
vendored
@@ -29,7 +29,7 @@ class VarDumper
|
||||
{
|
||||
if (null === self::$handler) {
|
||||
$cloner = new VarCloner();
|
||||
$dumper = in_array(PHP_SAPI, array('cli', 'phpdbg')) ? new CliDumper() : new HtmlDumper();
|
||||
$dumper = \in_array(PHP_SAPI, array('cli', 'phpdbg'), true) ? new CliDumper() : new HtmlDumper();
|
||||
self::$handler = function ($var) use ($cloner, $dumper) {
|
||||
$dumper->dump($cloner->cloneVar($var));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user