mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 16:02:23 +02:00
Updated Rector to commit 3edca66bc0c30e7853e4bfa627a9f911d6567220
3edca66bc0
Skip DateTime from property type to property renaming to keep code readable (#6812)
This commit is contained in:
parent
059b827cc6
commit
fddb5f36e9
@ -36,6 +36,10 @@ final class PropertyRenameGuard
|
||||
if ($this->nodeTypeResolver->isObjectType($propertyRename->getProperty(), new ObjectType('Ramsey\\Uuid\\UuidInterface'))) {
|
||||
return \true;
|
||||
}
|
||||
// skip date times, as often custom named and using "dateTime" does not bring any value to code
|
||||
if ($propertyRename->getExpectedName() === 'dateTime') {
|
||||
return \true;
|
||||
}
|
||||
if ($this->dateTimeAtNamingConventionGuard->isConflicting($propertyRename)) {
|
||||
return \true;
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '2.0.11';
|
||||
public const PACKAGE_VERSION = '3edca66bc0c30e7853e4bfa627a9f911d6567220';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2025-03-28 01:26:54';
|
||||
public const RELEASE_DATE = '2025-03-28 17:26:16';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -3,7 +3,6 @@
|
||||
declare (strict_types=1);
|
||||
namespace Rector\NodeTypeResolver\PHPStan\Scope;
|
||||
|
||||
use PHPStan\Analyser\UndefinedVariableException;
|
||||
use Error;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
@ -87,6 +86,7 @@ use PhpParser\NodeTraverser;
|
||||
use PHPStan\Analyser\MutatingScope;
|
||||
use PHPStan\Analyser\NodeScopeResolver;
|
||||
use PHPStan\Analyser\ScopeContext;
|
||||
use PHPStan\Analyser\UndefinedVariableException;
|
||||
use PHPStan\Node\FunctionCallableNode;
|
||||
use PHPStan\Node\InstantiationCallableNode;
|
||||
use PHPStan\Node\MethodCallableNode;
|
||||
|
50
vendor/composer/installed.json
vendored
50
vendor/composer/installed.json
vendored
@ -1864,12 +1864,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "900dcbf2838a6524acabf3b3640c49469bc8daec"
|
||||
"reference": "49e65e62edb5b7b9be3880aff170f73431db1b9a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/900dcbf2838a6524acabf3b3640c49469bc8daec",
|
||||
"reference": "900dcbf2838a6524acabf3b3640c49469bc8daec",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/49e65e62edb5b7b9be3880aff170f73431db1b9a",
|
||||
"reference": "49e65e62edb5b7b9be3880aff170f73431db1b9a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1897,7 +1897,7 @@
|
||||
"tomasvotruba\/unused-public": "^2.0",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2025-03-24T14:14:08+00:00",
|
||||
"time": "2025-03-28T10:37:55+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
@ -1995,17 +1995,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/console",
|
||||
"version": "v6.4.17",
|
||||
"version_normalized": "6.4.17.0",
|
||||
"version": "v6.4.20",
|
||||
"version_normalized": "6.4.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/console.git",
|
||||
"reference": "799445db3f15768ecc382ac5699e6da0520a0a04"
|
||||
"reference": "2e4af9c952617cc3f9559ff706aee420a8464c36"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/799445db3f15768ecc382ac5699e6da0520a0a04",
|
||||
"reference": "799445db3f15768ecc382ac5699e6da0520a0a04",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/2e4af9c952617cc3f9559ff706aee420a8464c36",
|
||||
"reference": "2e4af9c952617cc3f9559ff706aee420a8464c36",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2038,7 +2038,7 @@
|
||||
"symfony\/stopwatch": "^5.4|^6.0|^7.0",
|
||||
"symfony\/var-dumper": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2024-12-07T12:07:30+00:00",
|
||||
"time": "2025-03-03T17:16:38+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"patches_applied": [
|
||||
@ -2077,7 +2077,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.4.17"
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.4.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2386,23 +2386,23 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/process",
|
||||
"version": "v6.4.19",
|
||||
"version_normalized": "6.4.19.0",
|
||||
"version": "v6.4.20",
|
||||
"version_normalized": "6.4.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/process.git",
|
||||
"reference": "7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3"
|
||||
"reference": "e2a61c16af36c9a07e5c9906498b73e091949a20"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3",
|
||||
"reference": "7a1c12e87b08ec9c97abdd188c9b3f5a40e37fc3",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/e2a61c16af36c9a07e5c9906498b73e091949a20",
|
||||
"reference": "e2a61c16af36c9a07e5c9906498b73e091949a20",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"time": "2025-02-04T13:35:48+00:00",
|
||||
"time": "2025-03-10T17:11:00+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -2430,7 +2430,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https:\/\/symfony.com",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.4.19"
|
||||
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.4.20"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2536,17 +2536,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/yaml",
|
||||
"version": "v7.2.3",
|
||||
"version_normalized": "7.2.3.0",
|
||||
"version": "v7.2.5",
|
||||
"version_normalized": "7.2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/yaml.git",
|
||||
"reference": "ac238f173df0c9c1120f862d0f599e17535a87ec"
|
||||
"reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/ac238f173df0c9c1120f862d0f599e17535a87ec",
|
||||
"reference": "ac238f173df0c9c1120f862d0f599e17535a87ec",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
|
||||
"reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2560,7 +2560,7 @@
|
||||
"require-dev": {
|
||||
"symfony\/console": "^6.4|^7.0"
|
||||
},
|
||||
"time": "2025-01-07T12:55:42+00:00",
|
||||
"time": "2025-03-03T07:12:39+00:00",
|
||||
"bin": [
|
||||
"Resources\/bin\/yaml-lint"
|
||||
],
|
||||
@ -2591,7 +2591,7 @@
|
||||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https:\/\/symfony.com",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.2.3"
|
||||
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.2.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
||||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 105ae61'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 480f1cf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 3158fa9'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 900dcbf'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 105ae61'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 480f1cf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 3158fa9'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 49e65e6'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
@ -38,6 +38,9 @@ final class ServiceMapFactory
|
||||
}
|
||||
$def = $this->convertXmlToArray($def);
|
||||
$tags = $this->createTagFromXmlElement($def);
|
||||
if (\in_array('container.excluded', \array_column($tags, 'name'), \true)) {
|
||||
continue;
|
||||
}
|
||||
$service = $this->createServiceFromXmlAndTagsData($attrs, $tags);
|
||||
if ($service->getAlias() !== null) {
|
||||
$aliases[] = $service;
|
||||
|
@ -411,6 +411,11 @@ final class ProgressBar
|
||||
if ($this->output instanceof ConsoleSectionOutput) {
|
||||
$messageLines = \explode("\n", $this->previousMessage);
|
||||
$lineCount = \count($messageLines);
|
||||
$lastLineWithoutDecoration = Helper::removeDecoration($this->output->getFormatter(), \end($messageLines) ?? '');
|
||||
// When the last previous line is empty (without formatting) it is already cleared by the section output, so we don't need to clear it again
|
||||
if ('' === $lastLineWithoutDecoration) {
|
||||
--$lineCount;
|
||||
}
|
||||
foreach ($messageLines as $messageLine) {
|
||||
$messageLineLength = Helper::width(Helper::removeDecoration($this->output->getFormatter(), $messageLine));
|
||||
if ($messageLineLength > $this->terminal->getWidth()) {
|
||||
|
2
vendor/symfony/process/Pipes/UnixPipes.php
vendored
2
vendor/symfony/process/Pipes/UnixPipes.php
vendored
@ -55,7 +55,7 @@ class UnixPipes extends AbstractPipes
|
||||
return [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']];
|
||||
}
|
||||
if ($this->ptyMode && Process::isPtySupported()) {
|
||||
return [['pty'], ['pty'], ['pty']];
|
||||
return [['pty'], ['pty'], ['pipe', 'w']];
|
||||
}
|
||||
return [
|
||||
['pipe', 'r'],
|
||||
|
12
vendor/symfony/yaml/Parser.php
vendored
12
vendor/symfony/yaml/Parser.php
vendored
@ -960,7 +960,15 @@ class Parser
|
||||
private function lexUnquotedString(int &$cursor) : string
|
||||
{
|
||||
$offset = $cursor;
|
||||
$cursor += \strcspn($this->currentLine, '[]{},:', $cursor);
|
||||
while ($cursor < \strlen($this->currentLine)) {
|
||||
if (\in_array($this->currentLine[$cursor], ['[', ']', '{', '}', ',', ':'], \true)) {
|
||||
break;
|
||||
}
|
||||
if (\in_array($this->currentLine[$cursor], [' ', "\t"], \true) && '#' === ($this->currentLine[$cursor + 1] ?? '')) {
|
||||
break;
|
||||
}
|
||||
++$cursor;
|
||||
}
|
||||
if ($cursor === $offset) {
|
||||
throw new ParseException('Malformed unquoted YAML string.');
|
||||
}
|
||||
@ -1023,7 +1031,7 @@ class Parser
|
||||
{
|
||||
$whitespacesConsumed = 0;
|
||||
do {
|
||||
$whitespaceOnlyTokenLength = \strspn($this->currentLine, ' ', $cursor);
|
||||
$whitespaceOnlyTokenLength = \strspn($this->currentLine, " \t", $cursor);
|
||||
$whitespacesConsumed += $whitespaceOnlyTokenLength;
|
||||
$cursor += $whitespaceOnlyTokenLength;
|
||||
if (isset($this->currentLine[$cursor])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user