Updated Rector to commit 6e90cc741ca2e6d94fe485fd01c085a7641d5d93

6e90cc741c [ReadWrite] Remove parent attribute usage on ReadWritePropertyAnalyzer (#4398)
This commit is contained in:
Tomas Votruba 2023-07-01 15:51:11 +00:00
parent 6aada686fa
commit b083f2427f
6 changed files with 14 additions and 19 deletions

View File

@ -9,7 +9,6 @@ use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PHPStan\Analyser\Scope;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\NodeManipulator\AssignManipulator;
use Rector\DeadCode\SideEffect\PureFunctionDetector;
use Rector\NodeTypeResolver\Node\AttributeKey;
@ -52,12 +51,8 @@ final class ReadWritePropertyAnalyzer
/**
* @param \PhpParser\Node\Expr\PropertyFetch|\PhpParser\Node\Expr\StaticPropertyFetch $node
*/
public function isRead($node, Scope $scope) : bool
public function isRead($node, Node $parentNode, Scope $scope) : bool
{
$parentNode = $node->getAttribute(AttributeKey::PARENT_NODE);
if (!$parentNode instanceof Node) {
throw new ShouldNotHappenException();
}
foreach ($this->parentNodeReadAnalyzers as $parentNodeReadAnalyzer) {
if ($parentNodeReadAnalyzer->isRead($node, $parentNode)) {
return \true;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5944b6d6a998a6ee854b699f5a8541bdc8a17818';
public const PACKAGE_VERSION = '6e90cc741ca2e6d94fe485fd01c085a7641d5d93';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-07-01 21:17:18';
public const RELEASE_DATE = '2023-07-01 22:45:25';
/**
* @var int
*/

View File

@ -237,7 +237,7 @@ final class PropertyManipulator
}
}
if ($parentNode instanceof ArrayDimFetch) {
return !$this->readWritePropertyAnalyzer->isRead($propertyFetch, $scope);
return !$this->readWritePropertyAnalyzer->isRead($propertyFetch, $parentNode, $scope);
}
return \false;
}

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInite5efaf694c4d35160a7244cdb7900011
class ComposerAutoloaderInit60fb7a85feaf5cd9d65eff709f631b40
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInite5efaf694c4d35160a7244cdb7900011
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInite5efaf694c4d35160a7244cdb7900011', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit60fb7a85feaf5cd9d65eff709f631b40', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInite5efaf694c4d35160a7244cdb7900011', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit60fb7a85feaf5cd9d65eff709f631b40', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite5efaf694c4d35160a7244cdb7900011::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInite5efaf694c4d35160a7244cdb7900011::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40::$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 ComposerStaticInite5efaf694c4d35160a7244cdb7900011
class ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3099,9 +3099,9 @@ class ComposerStaticInite5efaf694c4d35160a7244cdb7900011
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInite5efaf694c4d35160a7244cdb7900011::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInite5efaf694c4d35160a7244cdb7900011::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInite5efaf694c4d35160a7244cdb7900011::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit60fb7a85feaf5cd9d65eff709f631b40::$classMap;
}, null, ClassLoader::class);
}