diff --git a/composer.json b/composer.json index a0834909..03c925fe 100644 --- a/composer.json +++ b/composer.json @@ -7,19 +7,16 @@ "php": ">=8.2" }, "require-dev": { - "rector/rector-src": "dev-main", + "rector/rector-src": "dev-upgrade-to-php-parser5-and-phpstan-2", "phpunit/phpunit": "^10.5", - "phpstan/phpstan": "^1.12", - "symplify/phpstan-rules": "^13.0", - "symplify/phpstan-extensions": "^11.4", + "phpstan/phpstan": "^2.0", "symplify/easy-coding-standard": "^12.3", "phpstan/extension-installer": "^1.4", - "phpstan/phpstan-webmozart-assert": "^1.2", "symplify/vendor-patches": "^11.3", "tracy/tracy": "^2.10", "tomasvotruba/class-leak": "^1.2", - "rector/type-perfect": "^1.0", - "rector/swiss-knife": "^1.0" + "rector/swiss-knife": "^1.0", + "phpstan/phpstan-webmozart-assert": "^2.0" }, "autoload": { "psr-4": { @@ -43,7 +40,7 @@ "@docs", "phpunit" ], - "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify", + "phpstan": "vendor/bin/phpstan analyse --ansi", "check-cs": "vendor/bin/ecs check --ansi", "class-leak": "vendor/bin/class-leak check config src rules --skip-suffix \"Rector\"", "fix-cs": "vendor/bin/ecs check --fix --ansi", diff --git a/phpstan.neon b/phpstan.neon index c84a4e8c..70ebfee0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,12 +19,13 @@ parameters: - */Fixture/* - */Expected/* - # see https://github.com/rectorphp/type-perfect/ - type_perfect: - no_mixed: true - null_over_false: true - narrow_param: true - narrow_return: true +# to be enabled later once rector upgraded to use phpstan v2 +# # see https://github.com/rectorphp/type-perfect/ +# type_perfect: +# no_mixed: true +# null_over_false: true +# narrow_param: true +# narrow_return: true ignoreErrors: # phpstan false positive @@ -34,3 +35,25 @@ parameters: - '#Access to an undefined property Rector\\Contract\\PhpParser\\Node\\StmtsAwareInterface\:\:\$stmts#' - '#PhpParser\\Node\\Stmt\\Expression is not generic#' + + # more advanced usage, but not always working + # see https://github.com/rectorphp/rector-src/actions/runs/11798721617/job/32865546672?pr=6422#step:5:110 + - '#Doing instanceof PHPStan\\Type\\.+ is error\-prone and deprecated#' + + - + identifier: instanceof.alwaysTrue + + - + identifier: argument.type + + # phpstan instanceof + - + identifier: phpstanApi.instanceofAssumption + + - + identifier: phpstanApi.varTagAssumption + + - + identifier: assign.propertyType + + - '#::provideMinPhpVersion\(\) never returns \d+ so it can be removed from the return type#' diff --git a/rules/CodeQuality/NodeFactory/NestedClosureAssertFactory.php b/rules/CodeQuality/NodeFactory/NestedClosureAssertFactory.php index cf9f44a0..a844601d 100644 --- a/rules/CodeQuality/NodeFactory/NestedClosureAssertFactory.php +++ b/rules/CodeQuality/NodeFactory/NestedClosureAssertFactory.php @@ -16,7 +16,7 @@ use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use Rector\PHPUnit\Enum\ConsecutiveVariable; @@ -59,7 +59,7 @@ public function create(MethodCall $assertMethodCall, int $assertKey): array $stmts = [new Expression($callbackAssign)]; - $parametersArrayDimFetch = new ArrayDimFetch(new Variable('parameters'), new LNumber($assertKey)); + $parametersArrayDimFetch = new ArrayDimFetch(new Variable('parameters'), new Int_($assertKey)); $callbackFuncCall = new FuncCall($callbackVariable, [new Arg($parametersArrayDimFetch)]); // add assert true to the callback @@ -77,7 +77,7 @@ private function createAssertSameParameters(Expr $comparedExpr, int $assertKey): // use assert same directly instead $args = [ new Arg($comparedExpr), - new Arg(new ArrayDimFetch(new Variable('parameters'), new LNumber($assertKey))), + new Arg(new ArrayDimFetch(new Variable('parameters'), new Int_($assertKey))), ]; $assertSameMethodCall = new MethodCall(new Variable('this'), new Identifier('assertSame'), $args); @@ -90,7 +90,7 @@ private function createAssertSameParameters(Expr $comparedExpr, int $assertKey): */ private function createAssertNotEmpty(int $assertKey, string $emptyMethodName): array { - $arrayDimFetch = new ArrayDimFetch(new Variable(ConsecutiveVariable::PARAMETERS), new LNumber($assertKey)); + $arrayDimFetch = new ArrayDimFetch(new Variable(ConsecutiveVariable::PARAMETERS), new Int_($assertKey)); $assertEmptyMethodCall = new MethodCall(new Variable('this'), new Identifier($emptyMethodName), [ new Arg($arrayDimFetch), diff --git a/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php b/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php index 1aaf160d..e427593b 100644 --- a/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php @@ -4,6 +4,7 @@ namespace Rector\PHPUnit\CodeQuality\Rector\ClassMethod; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; @@ -246,7 +247,7 @@ private function createMockedClassMethod(MethodCall $rootMethodCall, MethodCall ->value; return new ClassMethod($methodName, [ - 'flags' => Class_::MODIFIER_PUBLIC, + 'flags' => Modifiers::PUBLIC, 'stmts' => [new Return_($returnedExpr)], ]); } diff --git a/rules/CodeQuality/Rector/ClassMethod/DataProviderArrayItemsNewLinedRector.php b/rules/CodeQuality/Rector/ClassMethod/DataProviderArrayItemsNewLinedRector.php index 09d6222d..4d2186ff 100644 --- a/rules/CodeQuality/Rector/ClassMethod/DataProviderArrayItemsNewLinedRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/DataProviderArrayItemsNewLinedRector.php @@ -5,8 +5,8 @@ namespace Rector\PHPUnit\CodeQuality\Rector\ClassMethod; use PhpParser\Node; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr\Array_; -use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Return_; use Rector\NodeTypeResolver\Node\AttributeKey; diff --git a/rules/CodeQuality/Rector/Class_/SetUpBeforeClassToSetUpRector.php b/rules/CodeQuality/Rector/Class_/SetUpBeforeClassToSetUpRector.php index bba3be3f..94f3e20e 100644 --- a/rules/CodeQuality/Rector/Class_/SetUpBeforeClassToSetUpRector.php +++ b/rules/CodeQuality/Rector/Class_/SetUpBeforeClassToSetUpRector.php @@ -4,6 +4,7 @@ namespace Rector\PHPUnit\CodeQuality\Rector\Class_; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\PropertyFetch; @@ -134,13 +135,13 @@ public function refactor(Node $node): ?Node } // remove static flag - $setUpBeforeClassMethod->flags -= Class_::MODIFIER_STATIC; + $setUpBeforeClassMethod->flags -= Modifiers::STATIC; // remove public flag - $setUpBeforeClassMethod->flags -= Class_::MODIFIER_PUBLIC; + $setUpBeforeClassMethod->flags -= Modifiers::PUBLIC; // make protected - $setUpBeforeClassMethod->flags += Class_::MODIFIER_PROTECTED; + $setUpBeforeClassMethod->flags += Modifiers::PROTECTED; $setUpBeforeClassMethod->name = new Identifier('setUp'); @@ -150,7 +151,7 @@ public function refactor(Node $node): ?Node } if ($this->isNames($property, $changedPropertyNames)) { - $property->flags -= Class_::MODIFIER_STATIC; + $property->flags -= Modifiers::STATIC; } } diff --git a/rules/CodeQuality/Rector/Class_/TestWithToDataProviderRector.php b/rules/CodeQuality/Rector/Class_/TestWithToDataProviderRector.php index 1d6d2724..7dfa483a 100644 --- a/rules/CodeQuality/Rector/Class_/TestWithToDataProviderRector.php +++ b/rules/CodeQuality/Rector/Class_/TestWithToDataProviderRector.php @@ -6,10 +6,11 @@ use Nette\Utils\Json; use Nette\Utils\Strings; +use PhpParser\Modifiers; use PhpParser\Node; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; -use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; @@ -174,7 +175,7 @@ private function refactorClassMethod(Class_ $class, ClassMethod $classMethod): v } $providerMethod = new ClassMethod($dataProviderName); - $providerMethod->flags = Class_::MODIFIER_PUBLIC; + $providerMethod->flags = Modifiers::PUBLIC; $providerMethod->stmts[] = new Return_($returnValue); $this->classInsertManipulator->addAsFirstMethod($class, $providerMethod); } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector.php b/rules/CodeQuality/Rector/MethodCall/AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector.php index 7cf6f44b..4ffa593b 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertEqualsOrAssertSameFloatParameterToSpecificMethodsTypeRector.php @@ -9,7 +9,7 @@ use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\DNumber; +use PhpParser\Node\Scalar\Float_; use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer; use Rector\PHPUnit\NodeFactory\AssertCallFactory; use Rector\Rector\AbstractRector; @@ -74,7 +74,7 @@ public function refactor(Node $node): ?Node $args = $node->getArgs(); $firstValue = $args[0]->value; - if (! $firstValue instanceof DNumber) { + if (! $firstValue instanceof Float_) { return null; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector.php b/rules/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector.php index 9ea25ff1..4c60861f 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertEqualsToSameRector.php @@ -9,7 +9,7 @@ use PhpParser\Node\Expr\ClassConstFetch; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; -use PhpParser\Node\Scalar\Encapsed; +use PhpParser\Node\Scalar\InterpolatedString; use PHPStan\Type\Constant\ConstantArrayType; use PHPStan\Type\FloatType; use PHPStan\Type\IntegerType; @@ -152,7 +152,7 @@ private function isScalarOrEnumValue(Expr $expr): bool return true; } - if ($expr instanceof Encapsed) { + if ($expr instanceof InterpolatedString) { return true; } diff --git a/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php b/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php index 5ce28cf6..d8e62a7a 100644 --- a/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php +++ b/rules/CodeQuality/Rector/MethodCall/AssertRegExpRector.php @@ -12,7 +12,7 @@ use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt\Expression; use Rector\Contract\PhpParser\Node\StmtsAwareInterface; use Rector\Exception\ShouldNotHappenException; @@ -159,7 +159,7 @@ public function refactor(Node $node): ?Node private function resolveOldCondition(Expr $expr): int { - if ($expr instanceof LNumber) { + if ($expr instanceof Int_) { return $expr->value; } diff --git a/rules/CodeQuality/Rector/MethodCall/NarrowSingleWillReturnCallbackRector.php b/rules/CodeQuality/Rector/MethodCall/NarrowSingleWillReturnCallbackRector.php index c78550a5..77d844c2 100644 --- a/rules/CodeQuality/Rector/MethodCall/NarrowSingleWillReturnCallbackRector.php +++ b/rules/CodeQuality/Rector/MethodCall/NarrowSingleWillReturnCallbackRector.php @@ -12,7 +12,7 @@ use PhpParser\Node\Expr\Match_; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Identifier; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; use Rector\PHPUnit\CodeQuality\ValueObject\MatchAndReturnMatch; @@ -204,7 +204,7 @@ private function matchSingleMatchArmBodyWithConditionOne(Match_ $match): ?Expr private function isNumberOne(Expr $expr): bool { - if (! $expr instanceof LNumber) { + if (! $expr instanceof Int_) { return false; } diff --git a/rules/PHPUnit100/NodeFactory/WillReturnCallbackFactory.php b/rules/PHPUnit100/NodeFactory/WillReturnCallbackFactory.php index ed8eea76..321a21b6 100644 --- a/rules/PHPUnit100/NodeFactory/WillReturnCallbackFactory.php +++ b/rules/PHPUnit100/NodeFactory/WillReturnCallbackFactory.php @@ -6,15 +6,15 @@ use PhpParser\BuilderFactory; use PhpParser\Node\Arg; +use PhpParser\Node\ClosureUse; use PhpParser\Node\Expr; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\BinaryOp\Minus; use PhpParser\Node\Expr\Closure; -use PhpParser\Node\Expr\ClosureUse; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Param; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use Rector\PHPUnit\Enum\ConsecutiveVariable; @@ -80,7 +80,7 @@ private function createAssertSameDimFetch(Arg $firstArg, Variable $variable): Me $currentValueArrayDimFetch = new ArrayDimFetch($firstArg->value, new Minus( $matcherCountMethodCall, - new LNumber(1) + new Int_(1) )); $compareArgs = [new Arg($currentValueArrayDimFetch), new Arg($variable)]; diff --git a/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php b/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php index 12fded67..4614cf11 100644 --- a/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php +++ b/rules/PHPUnit100/Rector/StmtsAwareInterface/WithConsecutiveRector.php @@ -12,14 +12,14 @@ use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\StaticCall; +use PhpParser\Node\Expr\Throw_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; use PhpParser\Node\Param; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; -use PhpParser\Node\Stmt\Throw_; use Rector\Exception\ShouldNotHappenException; use Rector\PHPUnit\Enum\ConsecutiveMethodName; use Rector\PHPUnit\Enum\ConsecutiveVariable; @@ -106,8 +106,9 @@ public function getNodeTypes(): array /** * @param Expression $node + * @return null|Stmt[]|Expression */ - public function refactor(Node $node) + public function refactor(Node $node): null|array|Expression { if (! $this->testsNodeAnalyzer->isInTestClass($node)) { return null; @@ -166,7 +167,7 @@ public function refactor(Node $node) if ($willThrowException instanceof MethodCall) { $this->methodCallRemover->removeMethodCall($node, ConsecutiveMethodName::WILL_THROW_EXCEPTION); $expr = $this->getFirstArgValue($willThrowException); - $returnStmt = new Throw_($expr); + $returnStmt = new Expression(new Throw_($expr)); } $willReturnReferenceArgument = $this->methodCallNodeFinder->findByName( @@ -188,8 +189,8 @@ public function refactor(Node $node) if (! $expectsCall instanceof MethodCall && ! $expectsCall instanceof StaticCall) { // fallback to default by case count - $lNumber = new LNumber(\count($withConsecutiveMethodCall->args)); - $expectsCall = new MethodCall(new Variable('this'), new Identifier('exactly'), [new Arg($lNumber)]); + $int = new Int_(\count($withConsecutiveMethodCall->args)); + $expectsCall = new MethodCall(new Variable('this'), new Identifier('exactly'), [new Arg($int)]); } // 2. does willReturnCallback() exist? just merge them together @@ -221,7 +222,7 @@ public function refactor(Node $node) */ private function refactorToWillReturnCallback( MethodCall $withConsecutiveMethodCall, - ?Stmt $returnStmt, + Return_|Expression|null $returnStmt, Expr|Variable|null $referenceVariable, StaticCall|MethodCall $expectsCall, Expression $expression, diff --git a/rules/PHPUnit110/Rector/Class_/NamedArgumentForDataProviderRector.php b/rules/PHPUnit110/Rector/Class_/NamedArgumentForDataProviderRector.php index 74c54e6d..c669a6c7 100644 --- a/rules/PHPUnit110/Rector/Class_/NamedArgumentForDataProviderRector.php +++ b/rules/PHPUnit110/Rector/Class_/NamedArgumentForDataProviderRector.php @@ -218,7 +218,7 @@ private function refactorArrayKey(Array_ $array, array $dataProviderNameMapping) $allArrayKeyNames = []; foreach ($array->items as $arrayItem) { - if ($arrayItem?->key instanceof String_) { + if ($arrayItem->key instanceof String_) { $needToSetAllKeyNames = true; $allArrayKeyNames[] = $arrayItem->key->value; } @@ -230,10 +230,6 @@ private function refactorArrayKey(Array_ $array, array $dataProviderNameMapping) } foreach ($array->items as $arrayIndex => $arrayItem) { - if ($arrayItem === null) { - continue; - } - if (! isset($dataProviderNameMapping[$arrayIndex])) { continue; } @@ -271,13 +267,13 @@ private function extractDataProviderArrayItem(ClassMethod $classMethod): iterabl $dataProviderTestCases = $stmt->expr; foreach ($dataProviderTestCases->items as $dataProviderTestCase) { - $arrayItem = $dataProviderTestCase?->value; + $arrayItem = $dataProviderTestCase->value; if ($arrayItem instanceof Array_) { yield $arrayItem; } - $variableName = $arrayItem === null ? null : $this->getName($arrayItem); + $variableName = $this->getName($arrayItem); if ( $arrayItem instanceof Variable && $variableName !== null @@ -285,7 +281,7 @@ private function extractDataProviderArrayItem(ClassMethod $classMethod): iterabl ) { $dataProviderList = $resolvedVariables[$variableName]; foreach ($dataProviderList->items as $dataProviderItem) { - if ($dataProviderItem?->value instanceof Array_) { + if ($dataProviderItem->value instanceof Array_) { yield $dataProviderItem->value; } } diff --git a/src/NodeFactory/ConsecutiveIfsFactory.php b/src/NodeFactory/ConsecutiveIfsFactory.php index c2a92185..e0cfbfce 100644 --- a/src/NodeFactory/ConsecutiveIfsFactory.php +++ b/src/NodeFactory/ConsecutiveIfsFactory.php @@ -5,15 +5,15 @@ namespace Rector\PHPUnit\NodeFactory; use PhpParser\Node\Arg; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayDimFetch; -use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\ArrowFunction; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\If_; @@ -49,8 +49,8 @@ public function createIfs(MethodCall $withConsecutiveMethodCall, MethodCall $num } if (! $assertArrayItem->value instanceof MethodCall) { - $parametersDimFetch = new ArrayDimFetch(new Variable('parameters'), new LNumber($assertKey)); - $args = [new Arg($assertArrayItem), new Arg($parametersDimFetch)]; + $parametersDimFetch = new ArrayDimFetch(new Variable('parameters'), new Int_($assertKey)); + $args = [new Arg($assertArrayItem->value), new Arg($parametersDimFetch)]; $ifStmts[] = new Expression(new MethodCall(new Variable('this'), 'assertSame', $args)); continue; } @@ -67,7 +67,7 @@ public function createIfs(MethodCall $withConsecutiveMethodCall, MethodCall $num } else { $args = [ new Arg($assertMethodCall), - new Arg(new ArrayDimFetch(new Variable('parameters'), new LNumber($assertKey))), + new Arg(new ArrayDimFetch(new Variable('parameters'), new Int_($assertKey))), ]; $assertSameMethodCall = new MethodCall(new Variable('this'), new Identifier( @@ -88,7 +88,7 @@ public function createIfs(MethodCall $withConsecutiveMethodCall, MethodCall $num // @todo improve in time if ($identicalCompare->left instanceof Variable) { - $parametersArrayDimFetch = new ArrayDimFetch(new Variable('parameters'), new LNumber( + $parametersArrayDimFetch = new ArrayDimFetch(new Variable('parameters'), new Int_( 0 )); @@ -107,7 +107,7 @@ public function createIfs(MethodCall $withConsecutiveMethodCall, MethodCall $num throw new NotImplementedYetException(); } - $ifs[] = new If_(new Identical($numberOfInvocationsMethodCall, new LNumber($key + 1)), [ + $ifs[] = new If_(new Identical($numberOfInvocationsMethodCall, new Int_($key + 1)), [ 'stmts' => $ifStmts, ]); } @@ -121,7 +121,7 @@ private function createAssertMethodCall( int $parameterPositionKey ): Expression { $assertMethodCall->name = new Identifier('assertEquals'); - $parametersArrayDimFetch = new ArrayDimFetch($parametersVariable, new LNumber($parameterPositionKey)); + $parametersArrayDimFetch = new ArrayDimFetch($parametersVariable, new Int_($parameterPositionKey)); $assertMethodCall->args[] = new Arg($parametersArrayDimFetch);