mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 92f64ffc17e7ad969edf8e48cf02ba68f72b2efc
92f64ffc17
[Performance] Reduce double traverse on StrictNativeFunctionReturnTypeAnalyzer (#6320)
This commit is contained in:
parent
541989a0ce
commit
ebc5937a0e
@ -4,8 +4,6 @@ declare (strict_types=1);
|
||||
namespace Rector\TypeDeclaration\NodeAnalyzer\ReturnTypeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Expr\CallLike;
|
||||
use PhpParser\Node\Expr\Yield_;
|
||||
use PhpParser\Node\Expr\YieldFrom;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use Rector\PhpParser\Node\BetterNodeFinder;
|
||||
@ -43,9 +41,6 @@ final class StrictNativeFunctionReturnTypeAnalyzer
|
||||
if ($functionLike->stmts === null) {
|
||||
return null;
|
||||
}
|
||||
if ($this->betterNodeFinder->hasInstancesOfInFunctionLikeScoped($functionLike, [Yield_::class, YieldFrom::class])) {
|
||||
return null;
|
||||
}
|
||||
$returns = $this->betterNodeFinder->findReturnsScoped($functionLike);
|
||||
if (!$this->returnAnalyzer->hasOnlyReturnWithExpr($functionLike, $returns)) {
|
||||
return null;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'fbcf76dec9cfc313288233d93b22efeb24bbc97f';
|
||||
public const PACKAGE_VERSION = '92f64ffc17e7ad969edf8e48cf02ba68f72b2efc';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-09-21 08:21:45';
|
||||
public const RELEASE_DATE = '2024-09-21 20:07:30';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
56
vendor/composer/installed.json
vendored
56
vendor/composer/installed.json
vendored
@ -2007,17 +2007,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/console",
|
||||
"version": "v6.4.11",
|
||||
"version_normalized": "6.4.11.0",
|
||||
"version": "v6.4.12",
|
||||
"version_normalized": "6.4.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/console.git",
|
||||
"reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998"
|
||||
"reference": "72d080eb9edf80e36c19be61f72c98ed8273b765"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/42686880adaacdad1835ee8fc2a9ec5b7bd63998",
|
||||
"reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/72d080eb9edf80e36c19be61f72c98ed8273b765",
|
||||
"reference": "72d080eb9edf80e36c19be61f72c98ed8273b765",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2050,7 +2050,7 @@
|
||||
"symfony\/stopwatch": "^5.4|^6.0|^7.0",
|
||||
"symfony\/var-dumper": "^5.4|^6.0|^7.0"
|
||||
},
|
||||
"time": "2024-08-15T22:48:29+00:00",
|
||||
"time": "2024-09-20T08:15:52+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"patches_applied": [
|
||||
@ -2089,7 +2089,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.4.11"
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.4.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2179,17 +2179,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/filesystem",
|
||||
"version": "v6.4.9",
|
||||
"version_normalized": "6.4.9.0",
|
||||
"version": "v6.4.12",
|
||||
"version_normalized": "6.4.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/filesystem.git",
|
||||
"reference": "b51ef8059159330b74a4d52f68e671033c0fe463"
|
||||
"reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/filesystem\/zipball\/b51ef8059159330b74a4d52f68e671033c0fe463",
|
||||
"reference": "b51ef8059159330b74a4d52f68e671033c0fe463",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/filesystem\/zipball\/f810e3cbdf7fdc35983968523d09f349fa9ada12",
|
||||
"reference": "f810e3cbdf7fdc35983968523d09f349fa9ada12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2200,7 +2200,7 @@
|
||||
"require-dev": {
|
||||
"symfony\/process": "^5.4|^6.4|^7.0"
|
||||
},
|
||||
"time": "2024-06-28T09:49:33+00:00",
|
||||
"time": "2024-09-16T16:01:33+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -2228,7 +2228,7 @@
|
||||
"description": "Provides basic utilities for the filesystem",
|
||||
"homepage": "https:\/\/symfony.com",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/filesystem\/tree\/v6.4.9"
|
||||
"source": "https:\/\/github.com\/symfony\/filesystem\/tree\/v6.4.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2398,23 +2398,23 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/process",
|
||||
"version": "v6.4.8",
|
||||
"version_normalized": "6.4.8.0",
|
||||
"version": "v6.4.12",
|
||||
"version_normalized": "6.4.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/process.git",
|
||||
"reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5"
|
||||
"reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/8d92dd79149f29e89ee0f480254db595f6a6a2c5",
|
||||
"reference": "8d92dd79149f29e89ee0f480254db595f6a6a2c5",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/process\/zipball\/3f94e5f13ff58df371a7ead461b6e8068900fbb3",
|
||||
"reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"time": "2024-05-31T14:49:08+00:00",
|
||||
"time": "2024-09-17T12:47:12+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -2442,7 +2442,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https:\/\/symfony.com",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.4.8"
|
||||
"source": "https:\/\/github.com\/symfony\/process\/tree\/v6.4.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2548,17 +2548,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/yaml",
|
||||
"version": "v7.1.4",
|
||||
"version_normalized": "7.1.4.0",
|
||||
"version": "v7.1.5",
|
||||
"version_normalized": "7.1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/yaml.git",
|
||||
"reference": "92e080b851c1c655c786a2da77f188f2dccd0f4b"
|
||||
"reference": "4e561c316e135e053bd758bf3b3eb291d9919de4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/92e080b851c1c655c786a2da77f188f2dccd0f4b",
|
||||
"reference": "92e080b851c1c655c786a2da77f188f2dccd0f4b",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/4e561c316e135e053bd758bf3b3eb291d9919de4",
|
||||
"reference": "4e561c316e135e053bd758bf3b3eb291d9919de4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2571,7 +2571,7 @@
|
||||
"require-dev": {
|
||||
"symfony\/console": "^6.4|^7.0"
|
||||
},
|
||||
"time": "2024-08-12T09:59:40+00:00",
|
||||
"time": "2024-09-17T12:49:58+00:00",
|
||||
"bin": [
|
||||
"Resources\/bin\/yaml-lint"
|
||||
],
|
||||
@ -2602,7 +2602,7 @@
|
||||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https:\/\/symfony.com",
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.1.4"
|
||||
"source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.1.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
3
vendor/symfony/console/Terminal.php
vendored
3
vendor/symfony/console/Terminal.php
vendored
@ -193,8 +193,7 @@ class Terminal
|
||||
}
|
||||
$descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
|
||||
$cp = \function_exists('sapi_windows_cp_set') ? \sapi_windows_cp_get() : 0;
|
||||
$process = \proc_open(\is_array($command) ? \implode(' ', \array_map('escapeshellarg', $command)) : $command, $descriptorspec, $pipes, null, null, ['suppress_errors' => \true]);
|
||||
if (!\is_resource($process)) {
|
||||
if (!($process = \proc_open(\is_array($command) ? \implode(' ', \array_map('escapeshellarg', $command)) : $command, $descriptorspec, $pipes, null, null, ['suppress_errors' => \true]))) {
|
||||
return null;
|
||||
}
|
||||
$info = \stream_get_contents($pipes[1]);
|
||||
|
9
vendor/symfony/filesystem/Filesystem.php
vendored
9
vendor/symfony/filesystem/Filesystem.php
vendored
@ -211,6 +211,9 @@ class Filesystem
|
||||
/**
|
||||
* Change the owner of an array of files or directories.
|
||||
*
|
||||
* This method always throws on Windows, as the underlying PHP function is not supported.
|
||||
* @see https://www.php.net/chown
|
||||
*
|
||||
* @param string|int $user A user name or number
|
||||
* @param bool $recursive Whether change the owner recursively or not
|
||||
*
|
||||
@ -239,6 +242,9 @@ class Filesystem
|
||||
/**
|
||||
* Change the group of an array of files or directories.
|
||||
*
|
||||
* This method always throws on Windows, as the underlying PHP function is not supported.
|
||||
* @see https://www.php.net/chgrp
|
||||
*
|
||||
* @param string|int $group A group name or number
|
||||
* @param bool $recursive Whether change the group recursively or not
|
||||
*
|
||||
@ -598,6 +604,9 @@ class Filesystem
|
||||
$this->rename($tmpFile, $filename, \true);
|
||||
} finally {
|
||||
if (\file_exists($tmpFile)) {
|
||||
if ('\\' === \DIRECTORY_SEPARATOR && !\is_writable($tmpFile)) {
|
||||
self::box('chmod', $tmpFile, self::box('fileperms', $tmpFile) | 0200);
|
||||
}
|
||||
self::box('unlink', $tmpFile);
|
||||
}
|
||||
}
|
||||
|
1
vendor/symfony/process/CHANGELOG.md
vendored
1
vendor/symfony/process/CHANGELOG.md
vendored
@ -7,7 +7,6 @@ CHANGELOG
|
||||
* Add `PhpSubprocess` to handle PHP subprocesses that take over the
|
||||
configuration from their parent
|
||||
* Add `RunProcessMessage` and `RunProcessMessageHandler`
|
||||
* Support using `Process::findExecutable()` independently of `open_basedir`
|
||||
|
||||
5.2.0
|
||||
-----
|
||||
|
2
vendor/symfony/process/PhpSubprocess.php
vendored
2
vendor/symfony/process/PhpSubprocess.php
vendored
@ -96,7 +96,7 @@ class PhpSubprocess extends Process
|
||||
throw new RuntimeException('Unable to read ini: ' . $file);
|
||||
}
|
||||
// Check and remove directives after HOST and PATH sections
|
||||
if (\preg_match('/^\\s*\\[(?:PATH|HOST)\\s*=/mi', $data, $matches)) {
|
||||
if (\preg_match('/^\\s*\\[(?:PATH|HOST)\\s*=/mi', $data, $matches, \PREG_OFFSET_CAPTURE)) {
|
||||
$data = \substr($data, 0, $matches[0][1]);
|
||||
}
|
||||
$content .= $data . "\n";
|
||||
|
5
vendor/symfony/process/Process.php
vendored
5
vendor/symfony/process/Process.php
vendored
@ -378,7 +378,7 @@ class Process implements \IteratorAggregate
|
||||
throw new RuntimeException(\sprintf('The provided cwd "%s" does not exist.', $this->cwd));
|
||||
}
|
||||
$process = @\proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options);
|
||||
if (!\is_resource($process)) {
|
||||
if (!$process) {
|
||||
throw new RuntimeException('Unable to launch a new process.');
|
||||
}
|
||||
$this->process = $process;
|
||||
@ -1278,8 +1278,9 @@ class Process implements \IteratorAggregate
|
||||
private function close() : int
|
||||
{
|
||||
$this->processPipes->close();
|
||||
if (\is_resource($this->process)) {
|
||||
if ($this->process) {
|
||||
\proc_close($this->process);
|
||||
$this->process = null;
|
||||
}
|
||||
$this->exitcode = $this->processInformation['exitcode'];
|
||||
$this->status = self::STATUS_TERMINATED;
|
||||
|
7
vendor/symfony/yaml/Inline.php
vendored
7
vendor/symfony/yaml/Inline.php
vendored
@ -332,11 +332,17 @@ class Inline
|
||||
$len = \strlen($sequence);
|
||||
++$i;
|
||||
// [foo, bar, ...]
|
||||
$lastToken = null;
|
||||
while ($i < $len) {
|
||||
if (']' === $sequence[$i]) {
|
||||
return $output;
|
||||
}
|
||||
if (',' === $sequence[$i] || ' ' === $sequence[$i]) {
|
||||
if (',' === $sequence[$i] && (null === $lastToken || 'separator' === $lastToken)) {
|
||||
$output[] = null;
|
||||
} elseif (',' === $sequence[$i]) {
|
||||
$lastToken = 'separator';
|
||||
}
|
||||
++$i;
|
||||
continue;
|
||||
}
|
||||
@ -372,6 +378,7 @@ class Inline
|
||||
$value = new TaggedValue($tag, $value);
|
||||
}
|
||||
$output[] = $value;
|
||||
$lastToken = 'value';
|
||||
++$i;
|
||||
}
|
||||
throw new ParseException(\sprintf('Malformed inline YAML string: "%s".', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user