diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-03-24 14:38:02 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-03-24 14:38:02 +0000 |
| commit | 07fa5d7d0441e869beac2f4f0d158bc83e507769 (patch) | |
| tree | 98821ac5fa60e2b85b45bed4da882defea1f5c2e /vendor/symfony/polyfill-php72 | |
| parent | b7ccea42c3065e848edbb018d0fb7c4cb6cb30ba (diff) | |
| download | webtrees-07fa5d7d0441e869beac2f4f0d158bc83e507769.tar.gz webtrees-07fa5d7d0441e869beac2f4f0d158bc83e507769.tar.bz2 webtrees-07fa5d7d0441e869beac2f4f0d158bc83e507769.zip | |
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/polyfill-php72')
| -rw-r--r-- | vendor/symfony/polyfill-php72/LICENSE | 2 | ||||
| -rw-r--r-- | vendor/symfony/polyfill-php72/Php72.php | 30 | ||||
| -rw-r--r-- | vendor/symfony/polyfill-php72/bootstrap.php | 4 | ||||
| -rw-r--r-- | vendor/symfony/polyfill-php72/composer.json | 2 |
4 files changed, 33 insertions, 5 deletions
diff --git a/vendor/symfony/polyfill-php72/LICENSE b/vendor/symfony/polyfill-php72/LICENSE index 207646a052..24fa32c2e9 100644 --- a/vendor/symfony/polyfill-php72/LICENSE +++ b/vendor/symfony/polyfill-php72/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2017 Fabien Potencier +Copyright (c) 2015-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php index 5925c1b9ab..39f144caa3 100644 --- a/vendor/symfony/polyfill-php72/Php72.php +++ b/vendor/symfony/polyfill-php72/Php72.php @@ -39,7 +39,7 @@ final class Php72 public static function utf8_decode($s) { - $s .= ''; + $s = (string) $s; $len = strlen($s); for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { @@ -95,6 +95,34 @@ final class Php72 return self::$hashMask ^ hexdec(substr($hash, 16 - \PHP_INT_SIZE, \PHP_INT_SIZE)); } + public static function sapi_windows_vt100_support($stream, $enable = null) + { + // We cannot actually disable vt100 support if it is set + if (false === $enable || !self::stream_isatty($stream)) { + return false; + } + + // The native function does not apply to stdin + $meta = array_map('strtolower', stream_get_meta_data($stream)); + $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; + + return !$stdin + && (false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM')); + } + + public static function stream_isatty($stream) + { + if ('\\' === DIRECTORY_SEPARATOR) { + $stat = @fstat($stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; + } + + return function_exists('posix_isatty') && @posix_isatty($stream); + } + private static function initHashMask() { $obj = (object) array(); diff --git a/vendor/symfony/polyfill-php72/bootstrap.php b/vendor/symfony/polyfill-php72/bootstrap.php index b6522e84f4..9ccea829d4 100644 --- a/vendor/symfony/polyfill-php72/bootstrap.php +++ b/vendor/symfony/polyfill-php72/bootstrap.php @@ -13,10 +13,10 @@ use Symfony\Polyfill\Php72 as p; if (PHP_VERSION_ID < 70200) { if ('\\' === DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { - function sapi_windows_vt100_support() { return false; } + function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } } if (!function_exists('stream_isatty')) { - function stream_isatty($stream) { return function_exists('posix_isatty') && @posix_isatty($stream); } + function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } } if (!function_exists('utf8_encode')) { function utf8_encode($s) { return p\Php72::utf8_encode($s); } diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json index 18904e467b..b58c88a343 100644 --- a/vendor/symfony/polyfill-php72/composer.json +++ b/vendor/symfony/polyfill-php72/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } } } |
