Skip to content

Commit

Permalink
Updated Rector to commit 7d5d1ce55264aec6d17b3c7013802103c813c0a3
Browse files Browse the repository at this point in the history
rectorphp/rector-src@7d5d1ce [Core] Performance improvement: Remove unnecessary re-call FileFactory::createFileInfosFromPaths() (#3210)
  • Loading branch information
TomasVotruba committed Dec 17, 2022
1 parent eaa58f2 commit baf8af4
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/Application/ApplicationFileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function run(Configuration $configuration, InputInterface $input) : array
$systemErrorsAndFileDiffs = $this->runParallel($fileInfos, $configuration, $input);
} else {
// 1. collect all files from files+dirs provided paths
$files = $this->fileFactory->createFromPaths($configuration->getPaths(), $configuration);
$files = $this->fileFactory->createFromPaths($fileInfos);
// 2. PHPStan has to know about all files too
$this->configurePHPStanNodeScopeResolver($files);
$systemErrorsAndFileDiffs = $this->processFiles($files, $configuration);
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'f2e4da5e7f836d1618ece81f646cfe11ea4ac561';
public const PACKAGE_VERSION = '7d5d1ce55264aec6d17b3c7013802103c813c0a3';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-12-16 19:41:24';
public const RELEASE_DATE = '2022-12-17 09:27:57';
/**
* @var int
*/
Expand Down
5 changes: 2 additions & 3 deletions src/ValueObjectFactory/Application/FileFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ public function createFileInfosFromPaths(array $paths, Configuration $configurat
return $this->filesFinder->findInDirectoriesAndFiles($paths, $supportedFileExtensions);
}
/**
* @param string[] $paths
* @param string[] $filePaths
* @return File[]
*/
public function createFromPaths(array $paths, Configuration $configuration) : array
public function createFromPaths(array $filePaths) : array
{
$filePaths = $this->createFileInfosFromPaths($paths, $configuration);
$files = [];
foreach ($filePaths as $filePath) {
$files[] = new File($filePath, FileSystem::read($filePath));
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitdfc755c35b0471a41357eb137a10f3a7::getLoader();
return ComposerAutoloaderInit3a1f24a98ce81260484fae7ffefe990a::getLoader();
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitdfc755c35b0471a41357eb137a10f3a7
class ComposerAutoloaderInit3a1f24a98ce81260484fae7ffefe990a
{
private static $loader;

Expand All @@ -22,19 +22,19 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitdfc755c35b0471a41357eb137a10f3a7', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit3a1f24a98ce81260484fae7ffefe990a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitdfc755c35b0471a41357eb137a10f3a7', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit3a1f24a98ce81260484fae7ffefe990a', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiredfc755c35b0471a41357eb137a10f3a7($fileIdentifier, $file);
composerRequire3a1f24a98ce81260484fae7ffefe990a($fileIdentifier, $file);
}

return $loader;
Expand All @@ -46,7 +46,7 @@ public static function getLoader()
* @param string $file
* @return void
*/
function composerRequiredfc755c35b0471a41357eb137a10f3a7($fileIdentifier, $file)
function composerRequire3a1f24a98ce81260484fae7ffefe990a($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7
class ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3054,9 +3054,9 @@ class ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitdfc755c35b0471a41357eb137a10f3a7::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3a1f24a98ce81260484fae7ffefe990a::$classMap;

}, null, ClassLoader::class);
}
Expand Down
50 changes: 25 additions & 25 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,17 @@
},
{
"name": "fidry\/cpu-core-counter",
"version": "0.4.0",
"version_normalized": "0.4.0.0",
"version": "0.4.1",
"version_normalized": "0.4.1.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/theofidry\/cpu-core-counter.git",
"reference": "666cb04a02f2801f3b19955fc23c824f9018bf64"
"reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/theofidry\/cpu-core-counter\/zipball\/666cb04a02f2801f3b19955fc23c824f9018bf64",
"reference": "666cb04a02f2801f3b19955fc23c824f9018bf64",
"url": "https:\/\/api.github.com\/repos\/theofidry\/cpu-core-counter\/zipball\/79261cc280aded96d098e1b0e0ba0c4881b432c2",
"reference": "79261cc280aded96d098e1b0e0ba0c4881b432c2",
"shasum": ""
},
"require": {
Expand All @@ -467,7 +467,7 @@
"theofidry\/php-cs-fixer-config": "^1.0",
"webmozarts\/strict-phpunit": "^7.5"
},
"time": "2022-12-10T21:26:31+00:00",
"time": "2022-12-16T22:01:02+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand All @@ -492,7 +492,7 @@
],
"support": {
"issues": "https:\/\/github.com\/theofidry\/cpu-core-counter\/issues",
"source": "https:\/\/github.com\/theofidry\/cpu-core-counter\/tree\/0.4.0"
"source": "https:\/\/github.com\/theofidry\/cpu-core-counter\/tree\/0.4.1"
},
"funding": [
{
Expand Down Expand Up @@ -1844,12 +1844,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "61634310cf2be58e39647a51b0fe727b38d7874b"
"reference": "0a8e8d9cc82356668cf03e10fb82f58d389db1c9"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/61634310cf2be58e39647a51b0fe727b38d7874b",
"reference": "61634310cf2be58e39647a51b0fe727b38d7874b",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/0a8e8d9cc82356668cf03e10fb82f58d389db1c9",
"reference": "0a8e8d9cc82356668cf03e10fb82f58d389db1c9",
"shasum": ""
},
"require": {
Expand All @@ -1875,7 +1875,7 @@
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
},
"time": "2022-12-09T08:25:11+00:00",
"time": "2022-12-17T08:26:52+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
Expand Down Expand Up @@ -2339,17 +2339,17 @@
},
{
"name": "symfony\/console",
"version": "v6.2.1",
"version_normalized": "6.2.1.0",
"version": "v6.2.2",
"version_normalized": "6.2.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/console.git",
"reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f"
"reference": "5a9bd5c543f00157c55face973c149957467db31"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f",
"reference": "58f6cef5dc5f641b7bbdbf8b32b44cc926c35f3f",
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/5a9bd5c543f00157c55face973c149957467db31",
"reference": "5a9bd5c543f00157c55face973c149957467db31",
"shasum": ""
},
"require": {
Expand Down Expand Up @@ -2384,7 +2384,7 @@
"symfony\/lock": "",
"symfony\/process": ""
},
"time": "2022-12-01T13:44:20+00:00",
"time": "2022-12-16T15:08:36+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -2418,7 +2418,7 @@
"terminal"
],
"support": {
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.2.1"
"source": "https:\/\/github.com\/symfony\/console\/tree\/v6.2.2"
},
"funding": [
{
Expand Down Expand Up @@ -2944,17 +2944,17 @@
},
{
"name": "symfony\/string",
"version": "v6.2.0",
"version_normalized": "6.2.0.0",
"version": "v6.2.2",
"version_normalized": "6.2.2.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/string.git",
"reference": "145702685e0d12f81d755c71127bfff7582fdd36"
"reference": "863219fd713fa41cbcd285a79723f94672faff4d"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/145702685e0d12f81d755c71127bfff7582fdd36",
"reference": "145702685e0d12f81d755c71127bfff7582fdd36",
"url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/863219fd713fa41cbcd285a79723f94672faff4d",
"reference": "863219fd713fa41cbcd285a79723f94672faff4d",
"shasum": ""
},
"require": {
Expand All @@ -2974,7 +2974,7 @@
"symfony\/translation-contracts": "^2.0|^3.0",
"symfony\/var-exporter": "^5.4|^6.0"
},
"time": "2022-11-30T17:13:47+00:00",
"time": "2022-12-14T16:11:27+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -3013,7 +3013,7 @@
"utf8"
],
"support": {
"source": "https:\/\/github.com\/symfony\/string\/tree\/v6.2.0"
"source": "https:\/\/github.com\/symfony\/string\/tree\/v6.2.2"
},
"funding": [
{
Expand Down
Loading

0 comments on commit baf8af4

Please sign in to comment.