Updated Rector to commit 7d9c9111eb140283f77aa7ddeb57066e035de614

7d9c9111eb [automated] Apply Coding Standard (#4860)
This commit is contained in:
Tomas Votruba 2023-08-27 00:28:44 +00:00
parent 35b66505ec
commit 2473beec4a
9 changed files with 44 additions and 33 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '857e7a5604df3c36f85ea2702c066744a17728f7';
public const PACKAGE_VERSION = '7d9c9111eb140283f77aa7ddeb57066e035de614';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-26 13:42:39';
public const RELEASE_DATE = '2023-08-27 00:24:58';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit460b32294727977f601382b57e773088::getLoader();
return ComposerAutoloaderInit6a4a0ba3386c2126b327817962e9003c::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit460b32294727977f601382b57e773088
class ComposerAutoloaderInit6a4a0ba3386c2126b327817962e9003c
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit460b32294727977f601382b57e773088
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit460b32294727977f601382b57e773088', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit6a4a0ba3386c2126b327817962e9003c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit460b32294727977f601382b57e773088', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit6a4a0ba3386c2126b327817962e9003c', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit460b32294727977f601382b57e773088::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit6a4a0ba3386c2126b327817962e9003c::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit460b32294727977f601382b57e773088::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit6a4a0ba3386c2126b327817962e9003c::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit460b32294727977f601382b57e773088
class ComposerStaticInit6a4a0ba3386c2126b327817962e9003c
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2608,9 +2608,9 @@ class ComposerStaticInit460b32294727977f601382b57e773088
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit460b32294727977f601382b57e773088::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit460b32294727977f601382b57e773088::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit460b32294727977f601382b57e773088::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit6a4a0ba3386c2126b327817962e9003c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6a4a0ba3386c2126b327817962e9003c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit6a4a0ba3386c2126b327817962e9003c::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2095,17 +2095,17 @@
},
{
"name": "symfony\/console",
"version": "v6.3.2",
"version_normalized": "6.3.2.0",
"version": "v6.3.4",
"version_normalized": "6.3.4.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/console.git",
"reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898"
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/aa5d64ad3f63f2e48964fc81ee45cb318a723898",
"reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898",
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/eca495f2ee845130855ddf1cf18460c38966c8b6",
"reference": "eca495f2ee845130855ddf1cf18460c38966c8b6",
"shasum": ""
},
"require": {
@ -2134,7 +2134,7 @@
"symfony\/process": "^5.4|^6.0",
"symfony\/var-dumper": "^5.4|^6.0"
},
"time": "2023-07-19T20:17:28+00:00",
"time": "2023-08-16T10:10:12+00:00",
"type": "library",
"extra": {
"patches_applied": [
@ -2173,7 +2173,7 @@
"terminal"
],
"support": {
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.3.2"
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.3.4"
},
"funding": [
{
@ -2412,23 +2412,23 @@
},
{
"name": "symfony\/process",
"version": "v6.3.2",
"version_normalized": "6.3.2.0",
"version": "v6.3.4",
"version_normalized": "6.3.4.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/process.git",
"reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"
"reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
"reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/0b5c29118f2e980d455d2e34a5659f4579847c54",
"reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"time": "2023-07-12T16:00:22+00:00",
"time": "2023-08-07T10:39:22+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -2456,7 +2456,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https:\/\/symfony.com",
"support": {
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.3.2"
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.3.4"
},
"funding": [
{

File diff suppressed because one or more lines are too long

View File

@ -11,6 +11,7 @@
namespace RectorPrefix202308\Symfony\Component\Console\Formatter;
use RectorPrefix202308\Symfony\Component\Console\Exception\InvalidArgumentException;
use function RectorPrefix202308\Symfony\Component\String\b;
/**
* Formatter class for console output.
*
@ -213,7 +214,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
$prefix = '';
}
\preg_match('~(\\n)$~', $text, $matches);
$text = $prefix . \preg_replace('~([^\\n]{' . $width . '})\\ *~', "\$1\n", $text);
$text = $prefix . $this->addLineBreaks($text, $width);
$text = \rtrim($text, "\n") . ($matches[1] ?? '');
if (!$currentLineLength && '' !== $current && \substr_compare($current, "\n", -\strlen("\n")) !== 0) {
$text = "\n" . $text;
@ -232,4 +233,9 @@ class OutputFormatter implements WrappableOutputFormatterInterface
}
return \implode("\n", $lines);
}
private function addLineBreaks(string $text, int $width) : string
{
$encoding = \mb_detect_encoding($text, null, \true) ?: 'UTF-8';
return b($text)->toCodePointString($encoding)->wordwrap($width, "\n", \true)->toByteString($encoding);
}
}

View File

@ -59,8 +59,9 @@ class ConsoleSectionOutput extends StreamOutput
public function setMaxHeight(int $maxHeight) : void
{
// when changing max height, clear output of current section and redraw again with the new height
$existingContent = $this->popStreamContentUntilCurrentSection($this->maxHeight ? \min($this->maxHeight, $this->lines) : $this->lines);
$previousMaxHeight = $this->maxHeight;
$this->maxHeight = $maxHeight;
$existingContent = $this->popStreamContentUntilCurrentSection($previousMaxHeight ? \min($previousMaxHeight, $this->lines) : $this->lines);
parent::doWrite($this->getVisibleContent(), \false);
parent::doWrite($existingContent, \false);
}
@ -120,8 +121,7 @@ class ConsoleSectionOutput extends StreamOutput
// re-add the line break (that has been removed in the above `explode()` for
// - every line that is not the last line
// - if $newline is required, also add it to the last line
// - if it's not new line, but input ending with `\PHP_EOL`
if ($i < $count || $newline || \substr_compare($input, \PHP_EOL, -\strlen(\PHP_EOL)) === 0) {
if ($i < $count || $newline) {
$lineContent .= \PHP_EOL;
}
// skip line if there is no text (or newline for that matter)
@ -159,6 +159,11 @@ class ConsoleSectionOutput extends StreamOutput
*/
protected function doWrite(string $message, bool $newline)
{
// Simulate newline behavior for consistent output formatting, avoiding extra logic
if (!$newline && \substr_compare($message, \PHP_EOL, -\strlen(\PHP_EOL)) === 0) {
$message = \substr($message, 0, -\strlen(\PHP_EOL));
$newline = \true;
}
if (!$this->isDecorated()) {
parent::doWrite($message, $newline);
return;
@ -194,7 +199,7 @@ class ConsoleSectionOutput extends StreamOutput
if ($section === $this) {
break;
}
$numberOfLinesToClear += $section->lines;
$numberOfLinesToClear += $section->maxHeight ? \min($section->lines, $section->maxHeight) : $section->lines;
if ('' !== ($sectionContent = $section->getVisibleContent())) {
if (\substr_compare($sectionContent, \PHP_EOL, -\strlen(\PHP_EOL)) !== 0) {
$sectionContent .= \PHP_EOL;

View File

@ -298,7 +298,7 @@ class Process implements \IteratorAggregate
$descriptors[3] = ['pipe', 'w'];
// See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
$commandline = '{ (' . $commandline . ') <&3 3<&- 3>/dev/null & } 3<&0;';
$commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code';
$commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code';
// Workaround for the bug, when PTS functionality is enabled.
// @see : https://bugs.php.net/69442
$ptsWorkaround = \fopen(__FILE__, 'r');